我在我的测试服务器上设置了 Django 1.4,一切正常,除了管理界面,它返回 404 或 403 错误,具体取决于我的配置。
我还注意到“static/admin”目录只包含 css、js 和 img 目录。
任何帮助将不胜感激!
编辑 这是我的 apache 配置的相关部分:
DocumentRoot /home/jmetzler/www/public
WSGIDaemonProcess mezgrvm python-path=/home/jmetzler/www/private/py-bin:/home/jmetzler/www/private/py-bin/mezgrman:/usr/lib/python2.7/site-packages processes=1 threads=1 display-name=%{GROUP}
WSGIProcessGroup mezgrvm
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /home/jmetzler/www/private/py-bin/mezgrman/wsgi.py
Alias /admin /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin
Alias /images /home/jmetzler/www/public/images
Alias /css /home/jmetzler/www/public/css
Alias /error /home/jmetzler/www/public/error
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/jmetzler/www/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 410 /error/410.html
ErrorDocument 500 /error/500.html
</Directory>