this was the code it spit out:
Code:
server {
listen 80;
server_name domain.com www.domain.com;
# Redirect all HTTP to HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name domain.com www.domain.com;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
root /home/httpd/html/domain.com/public_html;
index index.php;
access_log /var/log/nginx/domain.com.log combined;
error_log /var/log/nginx/domain.com.error_log warn;
location ~ /.well-known {
root /var/www;
allow all;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
# Example for static content caching
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf)$ {
expires max;
log_not_found off;
add_header Cache-Control "public";
}
location ~ /\. {
deny all;
}
location ~ \.php$ {
fastcgi_pass php56-fpm; # Ensure the upstream here matches your PHP-FPM configuration
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}