Welcome! Log In Create A New Profile

Advanced

Can't set up a location

Posted by devboy 
Can't set up a location
September 07, 2010 07:25AM
Hi,

I've tried setting up a second location but keep getting the 404 page.

On a basic config that works I added a second location right after the first one and specified a different root directory.

[code]
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

location /testxxx/ {
root /var/www/html/test;
index index.html index.htm;
}
[/code]

The directory exists and has proper permissions:
[code]
[root@vps53016 bonus]# ls -al /var/www/html/test/
total 16
drwxrwxr-- 2 nginx nginx 4096 Sep 7 15:22 .
drwxr-xr-x 3 root root 4096 Sep 7 14:33 ..
-rw-rwxr-- 1 nginx nginx 3699 Sep 7 15:22 index.html
-rw-r--r-- 1 nginx nginx 318 Sep 7 14:36 screw2.png
[/code]

to navigate I tried
http://myurl/testxxx/
http://myurl/testxxx
http://myurl/testxxx/index.html

All return 404.


Any ideas?



Edited 1 time(s). Last edit at 09/07/2010 07:27AM by devboy.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 236
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready