As a Nginx noob, I have a problem which I can't solve. In Nginx website configuration I have:
server {
listen 443;
listen [::]:443;
ssl on;
ssl_certificate /etc/letsencrypt/live/website.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/website.eu/privkey.pem;
server_name website.eu www.website.eu;
index index.html index.htm index.php;
root /var/www/website;
location / {
try_files $uri $uri/ =404;
}
location /pihole {
alias /var/www/html;
try_files $uri $uri/ /admin/index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
}
Website works, but the Pihole was installed in /var/www/html
folder.
If I try to access it, I get:
user@website:~$ curl -i https://www.website.eu/pihole
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 01 Nov 2019 11:29:13 GMT
Content-Type: text/html
Content-Length: 194
Location: https://www.website.eu/pihole/
Connection: keep-alive
Any idea what is wrong?
root
. I've mentioned all the basic stuffs you need to know. If you're stuck at some place, please feel free to let me know. – heemayl Nov 04 '19 at 05:23