Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

nginx not using root from location (4 replies)

$
0
0
Hello. I'm obviously missing something but I'm not quite sure what.

Here's one of my vhosts.

server {
listen 80;
server_name test.local;

access_log /var/log/nginx/access.log;

root /data/www/htdocs/web;

location / {
index index.php;
}

location /testlocation {
index index.html
root /data/www/htdocs/test;
}
}

When I try to get index.html from /testlocation I always get 404 with message in errorlog that file is missing in /data/www/htdocs/web. Why?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>