- Full static mirror of the YellowPages/Drupal site (39 pages + all assets) - All URLs rewritten to relative/domain-agnostic form (works on any domain) - RFQ + request-quotation + contact forms converted to email (FormSubmit.co) - Google Maps embed replaced with static Google Maps iframe - nginx Dockerfile + config for EasyPanel deployment - mirror.py/rewrite.py/cleanup.py tooling for re-crawling updates
29 lines
911 B
Nginx Configuration File
29 lines
911 B
Nginx Configuration File
# nginx config for the static mitsu-chaiyaporn mirror.
|
|
# Serves directory index.html (e.g. /catalog/item/X/ -> .../index.html).
|
|
# Also handles the home "/" -> /index.html.
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Drop the Drupal "X-Drupal-Cache"-style dynamic headers; force no-cache on HTML
|
|
# so content refreshes on redeploy, but long-cache immutable assets.
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
# Cache static assets aggressively (hashed filenames -> safe to cache long)
|
|
location ~* \.(css|js|jpe?g|png|gif|webp|svg|ico|woff2?|ttf)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, max-age=2592000, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/css application/javascript image/svg+xml application/json;
|
|
}
|