ошибка django apache css 500 - PullRequest
       7

ошибка django apache css 500

0 голосов
/ 19 февраля 2011

Я недавно запустил сайт, используя django mingus, но проблема в том, что css не отображается, я получаю внутреннюю ошибку 500 сервера при обслуживании медиа-файлов.

Я использую apache, mod_wsgi.

https://gist.github.com/f25d5ecdab235d4da69b <- settings.py <a href="https://gist.github.com/d838c1923729afddf24a" rel="nofollow">https://gist.github.com/d838c1923729afddf24a <- apache site <a href="https://gist.github.com/d1e11e937e5910e839ee" rel="nofollow">https://gist.github.com/d1e11e937e5910e839ee <-Файл django.wsgi </p>

Я получаю это в логах

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 / статический/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

Больше информациивозможно, вам нужно, дайте мне знать ... что здесь может быть не так?

Спасибо вам всем.

1 Ответ

1 голос
/ 20 февраля 2011

Вам необходимо добавить псевдоним в вашу статическую папку в вашем Apache Conf (https://gist.github.com/d838c1923729afddf24a), чтобы ваши статические файлы доставлялись через Apache, а не mod_wsgi

, например, так:

<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

...