File: /var/lib/letsencrypt/backups/1777007661.3333828/laracopilot.stgviitor.com.conf_20
server {
root /var/www/laracopilot.stgviitor.com/laracopilot-wp;
index index.php index.html index.htm index.nginx-debian.html;
server_name laracopilot.stgviitor.com;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ /\.git {
deny all;
}
location ~* \.(jpg|jpeg|png|gif|webp|svg|ico)$ {
#expires 7d;
expires 365d;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
}
location ~* \.(pdf)$ {
expires 7d;
}
location ~* \.(css|js)$ {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
access_log off;
}
location ~* \.(woff|woff2|ttf|otf|eot)$ {
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
access_log off;
# Fix CORS for fonts (important)
add_header Access-Control-Allow-Origin "*";
}
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/laracopilot.stgviitor.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/laracopilot.stgviitor.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = laracopilot.stgviitor.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name laracopilot.stgviitor.com;
return 404; # managed by Certbot
}