customer-riverside/docker/nginx/default.conf

45 lines
1.4 KiB
Text
Raw Normal View History

2026-04-19 20:33:56 -08:00
server {
listen 80;
server_name _;
root /var/www/html/web;
index index.php;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { allow all; access_log off; log_not_found off; }
location ~ /\. { deny all; }
location ~* ^/sites/.*/files/.*\.php$ { deny all; }
location ~* ^/sites/.*/private/ { deny all; }
location / {
try_files $uri /index.php?$query_string;
}
location ~ '\.php$|^/update\.php' {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
2026-06-11 21:25:31 -08:00
fastcgi_param HTTP_HOST $http_host;
2026-04-19 20:33:56 -08:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors on;
fastcgi_read_timeout 300;
}
# True static assets (always on disk, never PHP-generated)
location ~* \.(png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|pdf)$ {
try_files $uri =404;
expires max;
access_log off;
}
# CSS/JS may be aggregated on first request via PHP; fall through to index.php if missing
location ~* \.(css|js)$ {
try_files $uri /index.php?$query_string;
2026-05-24 18:23:05 -08:00
${NGINX_CSS_CACHE}
2026-04-19 20:33:56 -08:00
access_log off;
}
}