I have a simple default website configuration located in my "sites-available" folder in nginx that looks like the one below.
When I try browse to /hello I'd expect it to serve the index.html file located in the root folder I specified. Instead, it is trying to get /hello/index.html within the root location I specified.
Is there a way to tell nginx to serve the files without prefixing the context path?
root /var/...;
location / {
...
}
location /hello/ {
root /home/vagrant/public_html/project/dist;
}
sites-enabled
directory and notsites-available
? There should be a symlink from the former to the latter for those sites that should be enabled. Perhaps you've edited a config that's not enabled and hence not being picked up. – wurtel Nov 14 '14 at 09:18