我有以下vhost条目
server {
listen 80;
server_name example.com www.example.com;
#access_log /var/log/Nginx/Nginx-access.log;
location /media/ {
root /home/luke/django/solentcms;
}
location /admin/media/ {
root /home/luke/virts/django1.25/lib/python2.7/site-packages/django/contrib/admin/media;
}
location / {
proxy_pass http://127.0.0.1:8001;
}
error_page 404 /404.html;
location = /404.html {
root /home/luke/django/solentcms/404;
allow all;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/luke/django/solentcms/404;
allow all;
}
}
然而,404和50x错误仍然被重定向到可怕的Nginx默认页面.任何想法为什么?此语法适用于我的其他服务器之一.
干杯.
最佳答案