File: /var/lib/letsencrypt/backups/1775711498.1975248/stg.everycred.com.conf_22
server {
root /var/www/stg-everycred.com;
index index.php index.html index.htm index.nginx-debian.html;
server_name stg.everycred.com;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ /\.git {
deny all;
}
# CSS 1 year
location ~* \.(css)$ {
expires 1y;
add_header Cache-Control "public, immutable, max-age=31536000";
access_log off;
}
# JS 1 year
location ~* \.(js)$ {
expires 1y;
add_header Cache-Control "public, immutable, max-age=31536000";
access_log off;
}
# Images 1 year
location ~* \.(jpg|jpeg|png|gif|svg|ico|webp)$ {
expires 1y;
add_header Cache-Control "public, immutable, max-age=31536000";
access_log off;
}
# Fonts 1 year
location ~* \.(woff|woff2|ttf|eot|otf)$ {
expires 1y;
add_header Cache-Control "public, immutable, max-age=31536000";
add_header Access-Control-Allow-Origin "*";
access_log off;
}
location ~* \.(pdf)$ {
expires 7d;
}
# listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/stg.everycred.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/stg.everycred.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 = stg.everycred.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name stg.everycred.com;
return 404; # managed by Certbot
}