I have a website and every time when I try to access the page in a subfolder like 'myDomain.com/privacy-policy', nginx returns me a '401 Authorization Required'. The website has the following folder structure:
-myDomain.com/
-index.html
-images/
-(images..)
-legal-disclosure/
-index.html
-css/
-(css files..)
-privacy-policy/
-index.html
-css/
-(css files..)
-template/
-templates.min.css
The corresponding nginx configuration:
server {
listen 80;
server_name myDomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name myDomain.com;
ssl_certificate /root/ssl-certs/myDomain.com_ssl_certificate.cer;
ssl_certificate_key /root/ssl-certs/_.myDomain.com_private_key.key;
location / {
root /var/www/html/myDomain.com;
index index.html;
}
location /privacy-policy {
root /var/www/html/myDomain.com/privacy-policy;
index index.html;
}
location /legal-disclosure {
root /var/www/html/myDomain.com/legal-disclosure;
index index.html;
}
}
Does anyone knows why?