I have troubles with nginx location block.
location /myApp/api/account/tutorialPage { alias /data/www/; index tutorial.html; }
if a have strict match - all is fine, a have access to my tutorial.html.
But i want every link that contains /tutorialPage would lead to tutorial.html.
So i made next location:
location ~ /tutorialPage { alias /data/www/; index tutorial.html; }
It must be something like "if link contains /tutorialPage than go to tutorial.html". But i have 403 error.
[error] 10148#0: *65346 directory index of "/data/www" is forbidden, client: 194.183.181.44, server: , request: "GET /myApp/api/account/tutorialPage/ HTTP/1.1", host: "my.domain.com", referrer: "https://my.domain.com/"
I have double checked that data/www dir is has chmod 755 (e.g can be read by enyone)
----UPD
Example of locations that works
location ~ /tutorialPage\z { rewrite ^/.* /tutorial redirect; } location /tutorial { alias /data/www; index tutorial.html; }