From “nginx config to serve static files” at
http://forum.nginx.org/showthread.php?t=11
Dear all,
I currently have setupped my nginx to be able to serve static files. The
snippets is as such:
Code:
server {
listen 80;
server_name 72.14.185.215;
location / {
root /var/www/nginx-default;
index index.html index.htm;
}
location /media {
root /var/www/media;
autoindex on;
allow all;
}
}
Now when I access from the browser using this address
http://72.14.185.215/media , I get a 404 message. I already created the
/var/www/media folder. Have I missed on something here?
Thanks in advance
Posted by jpartogi