Ever since I set up HTTPS through SSL in my sites-enabled/default config, Nginx is reading from /usr/share/www/html
rather than /var/www/html
. There are no references to /usr/.../html
in any of my files (when I use grep -r
) so I have no clue why this is happening.
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name MY_WEBSITE.TLD; # Before you ask, yes
return 302 https://$server_name$request_uri;
root /var/www/html;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
index index.html index.htm index.nginx-debian.html index.php;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Clearly I've defined the root. Why isn't it working?