django apache css error 500
I recently started a site using django mingus, but the problem is that the css are not showing, Im getting a serve开发者_如何学Gor internal error 500 when serving the media files.
Im using apache, mod_wsgi.
https://gist.github.com/f25d5ecdab235d4da69b <-- settings.py https://gist.github.com/d838c1923729afddf24a <-- apache site https://gist.github.com/d1e11e937e5910e839ee <-- django.wsgi file
Im getting this in the logs
190.158.255.93 - - [19/Feb/2011:20:21:46 +0000] "GET /static/img/favicon.ico HTTP/1.1" 500 9751 190.158.255.93 - - [19/Feb/2011:20:23:19 +0000] "GET / HTTP/1.1" 200 4079 190.158.255.93 - - [19/Feb/2011:20:23:20 +0000] "GET / HTTP/1.1" 200 4078 190.158.255.93 - - [19/Feb/2011:20:23:21 +0000] "GET /static/css/pygments.css HTTP/1.1" 500 9799 190.158.255.93 - - [19/Feb/2011:20:23:21 +0000] "GET /static/css/themes/basic.css HTTP/1.1" 500 9801 190.158.255.93 - - [19/Feb/2011:20:23:21 +0000] "GET /static/css/base.css HTTP/1.1" 500 9790 190.158.255.93 - - [19/Feb/2011:20:23:21 +0000] "GET /static/css/prettify.css HTTP/1.1" 500 9792 190.158.255.93 - - [19/Feb/2011:20:23:21 +0000] "GET /static/css/960.css HTTP/1.1" 500 9797 190.158.255.93 - - [19/Feb/2011:20:23:22 +0000] "GET /static/js/prettify.js HTTP/1.1" 500 9833 190.158.255.93 - - [19/Feb/2011:20:23:22 +0000] "GET /static/img/favicon.ico HTTP/1.1" 500 9738
Any more information you might need let me know... what might be wrong here?
Thank you all.
You need to add an Alias to your static folder in your apache conf (https://gist.github.com/d838c1923729afddf24a) so that your static files get delivered by apache and not mod_wsgi
like so:
<VirtualHost *:80>
WSGIDaemonProcess maumercado user=maumercado group=maumercado processes=1 threads=10 python-path=/home/maumercado/venvs/maublog/lib/python2.6/site-packages
ServerName www.maumercado.com
ServerAdmin admin@maumercado.com
Alias /static/ /path/to/folder/static/
WSGIScriptAlias / /home/maumercado/code/django/maublog/mingus/deploy/maublog.wsgi
WSGIProcessGroup maumercado
<Directory "/home/maumercado/code/django/maublog/mingus/deploy/">
Allow from all
</Directory>
ErrorLog /var/log/maublog/apache_error.log
LogLevel warn
CustomLog /var/log/maublog/apache_access.log common
ServerSignature On
精彩评论