I'm building a website using Django + Apache and Nginx to serve my static content. My site's index does not require any backend Django coding, so what would I need to change in nginx.conf to send requests for location / { } to some index.html in my static-content, while still allowing my urls.py to handle patterns appropriately?
upstream backend {
server 127.0.0.1:8080;
}
server {
listen 192.168.1.20:80;
server_name www.example.com example.com;
access_log /home/userxyz/public_html/example.com/logs/nginx_access.log;
error_log /home/userxyz/public_html/example.com/logs/nginx_error.log;
location /
{
proxy_pass http://127.0.0.1:8080;
include /etc/nginx/proxy.conf;
}
location ~ ^/(system|images|robots\.txt|css|js|favicon\.ico).*$
{
root /home/userxyz/public_html/example.com/static-content/;
}
location /media/
{
root /home/userxyz/public_html/example.com/;
}
}