Я создал сертификат с помощью патрона и включил систему, но сайт начал выдавать «Welcome to Nginx!»
Проблема с Cloudflare? Не могу понять. Без SSL сайт корректно отображается. Спасибо за любую помощь
# /etc/nginx/sites-available/site.net.conf
server {
# Force non-www version of the site
listen 80;
server_name site.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name site.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/site.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/site.com/chain.pem;
root /var/www/site/public; # Laravels public folder
autoindex on;
index index.php;
location / {
# First try and load files from the public folder, if they don't exist
# then send the request through to laravel
#try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?$query_string;
# Forward requests on to PHP-FPM
location = /index.php {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
location ^~ /.well-known/acme-challenge/ {
root /var/www/html;
}
}