33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
location ~ \.php(?:$|/) {
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
set $path_info $fastcgi_path_info;
|
|
|
|
try_files $fastcgi_script_name =404;
|
|
|
|
include /etc/nginx/nc.website.com/fastcgi.conf;
|
|
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $path_info;
|
|
fastcgi_param HTTPS on;
|
|
|
|
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
|
fastcgi_param front_controller_active true; # Enable pretty urls
|
|
fastcgi_pass mync:9000;
|
|
|
|
fastcgi_intercept_errors on;
|
|
fastcgi_request_buffering off;
|
|
}
|
|
|
|
location ~ \.(?:css|js|svg|gif)$ {
|
|
try_files $uri /index.php$request_uri;
|
|
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
|
}
|
|
|
|
location ~ \.woff2?$ {
|
|
try_files $uri /index.php$request_uri;
|
|
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
|
}
|
|
|
|
location / {
|
|
try_files $uri /index.php$request_uri;
|
|
}
|