Quote:
Originally Posted by troop
you have a recursion.
look
Code:
root /usr/html;
rewrite ^/$ /data/ break;
location /data/{
index index.php;
rewrite ^/data/(.*)$ /$1 break;
}
so accessing example.com will result in moving to "/usr/html/data". But second rewrite (^/data/(.*)$ /$1) result in moving back to /usr/html...
|
Now, when I try to access website at root dir I've got that error. The same goes for "website.com/data"
"/usr/share/data/data/index.php" is not found (2: No such file or directory), client: x.x.x.x, server: x.x.x.x, request: "GET / HTTP/1.1", host: "x.x.x.x"
"/usr/share/data/data/index.php" is not found (2: No such file or directory), client: x.x.x.x, server: x.x.x.x, request: "GET /data/ HTTP/1.1", host: "x.x.x.x"
I've added alias to required dir inside "location" directive and it's now working. Thanks a lot for pointing!
