Django, Apache, and 500 Server Error

Started experiments with Django framework – mostly straightforward.

To troubleshoot when deploying in Apache (I have Ubuntu – beware of specifics) – tailing error.log file for 500 server errors is useful. Logs are located in /var/logs/apache2

One last challenge that I recall was serving of static files (CSS stylesheets in my case – the ones that come by default with admin interface). To achieve – add the following line to your VirtualHost entry in apache config above WSGIScriptAlias line (adjust path for your location)

Alias /media/ /home/www-data/bin/django/django/contrib/admin/media/

Enjoy :-D



You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.