/var/lib/letsencrypt/backups/1775459435.5817208
Edit: /var/lib/letsencrypt/backups/1775459435.5817208/nabawater_1 (2813B)
server {
listen 80;
server_name nabawater.com.sa www.nabawater.com.sa nabawater.duceapps.com 65.1.249.253;
root /var/www/vhosts/nabawater;
index index.php index.html;
client_max_body_size 128M;
# Deny access to sensitive directories (must be before other locations)
location ~ ^/(common|console|environments|vagrant|vendor)/ {
deny all;
}
# Deny access to hidden files (except .well-known)
location ~ /\.(?!well-known) {
deny all;
}
# Well-known (for SSL verification etc.)
location /.well-known/ {
try_files $uri =404;
}
# Uploads - serve static files
location /uploads/ {
try_files $uri =404;
}
# Frontend web assets
location /frontend/web/ {
try_files $uri $uri/ /frontend/web/index.php$is_args$args;
}
# Backend web assets
location /backend/web/ {
try_files $uri $uri/ /backend/web/index.php$is_args$args;
}
# Backend routing
location /backend {
try_files $uri /backend/web/index.php$is_args$args;
}
# Admin
location /admin {
try_files $uri /admin/index.php$is_args$args;
}
# API
location /api {
try_files $uri /api/index.php$is_args$args;
}
# App (branch, vendor)
location /app/branch {
try_files $uri /app/branch/index.php$is_args$args;
}
location /app/vendor {
try_files $uri /app/vendor/index.php$is_args$args;
}
# Google verification
location = /google43eccc0a238614f1.html {
try_files $uri =404;
}
# Robots & Sitemap
location = /robots.txt {
try_files $uri /frontend/web/robots.txt =404;
}
location = /sitemap.xml {
try_files $uri =404;
}
# Frontend - default (catch-all)
location / {
try_files $uri $uri/ /frontend/web/index.php$is_args$args;
}
# PHP handling
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_read_timeout 300;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
# Deny access to config files
location ~ \.(json|lock|yml|yaml|md)$ {
deny all;
}
access_log /var/log/nginx/nabawater_access.log;
error_log /var/log/nginx/nabawater_error.log;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/nabawater.com.sa/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nabawater.com.sa/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
}