I installed Let's Encrypt on my VPS. Before this, page normally work but after - domain showing "Welcome to nginx" page.
I edited only default by adding declarations for SSL
server {
listen 80 default_server;
listen [::]:80 default_server;
# listen 443;
root /var/www/html/public;
index index.php index.html index.htm;
server_name example.com;
location / {
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;
}
location ~ /.well-known {
allow all;
}
return 301 https://$server_name$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include snippets/ssl-vrs-factory.net.conf;
include snippets/ssl-params.conf;
}
What is bad? Nginx was restarted.