File: /var/lib/letsencrypt/backups/1764250389.1003082/quadsite_0
server {
server_name quadcode.foach.site;
root /var/www/quadcode/public;
index index.html index.php;
client_max_body_size 20M;
charset utf-8;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|js|css|woff|txt|cjs|webp)$ {
root /var/www/quadcode/frontend/dist;
expires 1y;
access_log off;
add_header Cache-Control "public";
charset utf-8;
}
location / {
auth_basic "Unauthorized";
auth_basic_user_file /var/www/.htpasswd;
root /var/www/quadcode/frontend/dist;
try_files $uri $uri.html $uri/index.html index.html;
}
location /admin {
root /var/www/quadcode/public;
rewrite ^/admin/(.*)$ /$1 break;
try_files $uri $uri/ /index.php?$args;
}
location /build {
root /var/www/quadcode/public;
}
location /api/ {
root /var/www/quadcode/public;
try_files $uri $uri/ /index.php?$args;
}
location ^~ /lp/widget/assets/ {
alias /var/www/quadcode/one-time-popup/public/;
}
location = /lp/widget/popup-widget.umd.cjs {
root /var/www/quadcode/one-time-popup/build;
try_files /popup-widget.umd.cjs =404;
add_header Content-Type application/javascript;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 240;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /404.html;
location ~ /\.(?!well-known).* {
deny all;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/quadcode.foach.site/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/quadcode.foach.site/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 = ipsremont.foach.site) {
# return 301 https://$host$request_uri;
# } # managed by Certbot
# listen 80;
# server_name ipsremont.foach.site;
# return 404; # managed by Certbot
#}
server {
if ($host = quadcode.foach.site) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name quadcode.foach.site;
listen 80;
return 404; # managed by Certbot
}