I have set up Django's FastCGI + NGINX, but it's only working for root url: any request to http://example.com/anything
redirects to http://example.com
. Django's internal server working fine, NGINX static file serving and FastCGI processing of the root URL is fine, error log is clear. Here is my config's server section:
server {
listen 80;
server_name example.com;
location / {
fastcgi_pass localhost:8000;
include fastcgi_params;
}
location /static/ {
alias /root/web_development/src/web_development/static/;
}
}
What am I doing wrong? Thanks in advance.
Try this configs:
Make sure you've already informed nginx the port which django runs.
You may need to add this line to location /:
from djangoandnginx