site updates
This commit is contained in:
Regular → Executable
+90
-93
@@ -1,99 +1,96 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
error_log /dev/stderr warn;
|
||||
limit_req_zone $binary_remote_addr zone=contact_limit:10m rate=5r/m;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/javascript application/javascript
|
||||
application/json image/svg+xml font/woff2;
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /dev/stdout;
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /var/www/html;
|
||||
charset utf-8;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
server_tokens off;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; img-src 'self' data:; font-src 'self' https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' 'unsafe-inline' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; frame-src https://www.google.com/recaptcha/; connect-src 'self' https://www.google.com/recaptcha/; upgrade-insecure-requests" always;
|
||||
|
||||
limit_req_zone $binary_remote_addr zone=contact_limit:10m rate=5r/m;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/javascript application/javascript
|
||||
application/json image/svg+xml font/woff2;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /var/www/html;
|
||||
index index.html index.php;
|
||||
charset utf-8;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; img-src 'self' data:; font-src 'self' https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' 'unsafe-inline' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; frame-src https://www.google.com/recaptcha/; connect-src 'self' https://www.google.com/recaptcha/; upgrade-insecure-requests" always;
|
||||
|
||||
location ~ /\. { deny all; return 404; }
|
||||
location ~* \.(env|conf|yml|yaml|md|sh|py|pyc|sql|bak|old|swp|log|dockerfile)$ {
|
||||
deny all; return 404;
|
||||
}
|
||||
location = /Dockerfile { deny all; return 404; }
|
||||
|
||||
location = /robots.txt { try_files $uri =404; access_log off; }
|
||||
location = /sitemap.xml { try_files $uri =404; access_log off; }
|
||||
location = /llms.txt { try_files $uri =404; access_log off; }
|
||||
|
||||
location ~* \.(css|js|woff2|woff|ttf|otf)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
access_log off;
|
||||
}
|
||||
location ~* \.(jpg|jpeg|png|webp|gif|ico|svg|mp4|webm)$ {
|
||||
expires 6M;
|
||||
add_header Cache-Control "public";
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /api/contact {
|
||||
limit_req zone=contact_limit burst=3 nodelay;
|
||||
limit_req_status 429;
|
||||
rewrite ^ /api/contact.php last;
|
||||
}
|
||||
location = /api/contact/ {
|
||||
limit_req zone=contact_limit burst=3 nodelay;
|
||||
limit_req_status 429;
|
||||
rewrite ^ /api/contact.php last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_read_timeout 30s;
|
||||
}
|
||||
|
||||
location ~ ^/(?!404\.html$|500\.html$)(.+)\.html$ {
|
||||
return 301 /$1/;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/index.html $uri/ =404;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /500.html;
|
||||
location = /404.html { internal; }
|
||||
location = /500.html { internal; }
|
||||
location ~ /\. { deny all; return 404; }
|
||||
location ~* \.(env|conf|yml|yaml|md|sh|py|pyc|sql|bak|old|swp|log|dockerfile)$ {
|
||||
deny all; return 404;
|
||||
}
|
||||
location = /Dockerfile { deny all; return 404; }
|
||||
|
||||
location = /robots.txt { try_files $uri =404; access_log off; }
|
||||
location = /sitemap.xml { try_files $uri =404; access_log off; }
|
||||
location = /llms.txt { try_files $uri =404; access_log off; }
|
||||
location = /404.html { try_files $uri =404; access_log off; }
|
||||
location = /500.html { try_files $uri =404; access_log off; }
|
||||
|
||||
location /assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
access_log off;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location = /api/contact {
|
||||
limit_req zone=contact_limit burst=3 nodelay;
|
||||
limit_req_status 429;
|
||||
rewrite ^ /api/contact.php last;
|
||||
}
|
||||
location = /api/contact/ {
|
||||
limit_req zone=contact_limit burst=3 nodelay;
|
||||
limit_req_status 429;
|
||||
rewrite ^ /api/contact.php last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_read_timeout 30s;
|
||||
}
|
||||
|
||||
location = / { rewrite ^ /api/router.php?type=coming_soon last; }
|
||||
location = /about { rewrite ^ /api/router.php?type=about last; }
|
||||
location = /about/ { rewrite ^ /api/router.php?type=about last; }
|
||||
location = /the-practice { rewrite ^ /api/router.php?type=practice last; }
|
||||
location = /the-practice/ { rewrite ^ /api/router.php?type=practice last; }
|
||||
location = /services { rewrite ^ /api/router.php?type=services_index last; }
|
||||
location = /services/ { rewrite ^ /api/router.php?type=services_index last; }
|
||||
location ~ ^/services/([a-z0-9-]+)/?$ {
|
||||
rewrite ^/services/([a-z0-9-]+)/?$ /api/router.php?type=service&slug=$1 last;
|
||||
}
|
||||
location = /testimonials { rewrite ^ /api/router.php?type=testimonials last; }
|
||||
location = /testimonials/ { rewrite ^ /api/router.php?type=testimonials last; }
|
||||
location = /gallery { rewrite ^ /api/router.php?type=gallery last; }
|
||||
location = /gallery/ { rewrite ^ /api/router.php?type=gallery last; }
|
||||
location = /events { rewrite ^ /api/router.php?type=events last; }
|
||||
location = /events/ { rewrite ^ /api/router.php?type=events last; }
|
||||
location ~ ^/events/([a-z0-9-]+)/?$ {
|
||||
rewrite ^/events/([a-z0-9-]+)/?$ /api/router.php?type=event_detail&slug=$1 last;
|
||||
}
|
||||
location = /coming-soon { rewrite ^ /api/router.php?type=coming_soon last; }
|
||||
location = /coming-soon/ { rewrite ^ /api/router.php?type=coming_soon last; }
|
||||
location = /contact { rewrite ^ /api/router.php?type=contact last; }
|
||||
location = /contact/ { rewrite ^ /api/router.php?type=contact last; }
|
||||
location = /privacy-policy { rewrite ^ /api/router.php?type=legal&slug=privacy-policy last; }
|
||||
location = /privacy-policy/ { rewrite ^ /api/router.php?type=legal&slug=privacy-policy last; }
|
||||
location = /terms-of-service { rewrite ^ /api/router.php?type=legal&slug=terms-of-service last; }
|
||||
location = /terms-of-service/ { rewrite ^ /api/router.php?type=legal&slug=terms-of-service last; }
|
||||
|
||||
location / { rewrite ^ /api/router.php?type=coming_soon last; }
|
||||
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /500.html;
|
||||
}
|
||||
|
||||
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user