33 lines
933 B
Text
33 lines
933 B
Text
server {
|
|
listen 80;
|
|
listen [::]:80; # IPv6 support
|
|
|
|
server_name wpsc.example.com;
|
|
index index.php;
|
|
|
|
# Replace the path with the actual path to WordPress core files
|
|
root "/home/username/sites/wpsc.example.com/public";
|
|
|
|
access_log /var/log/nginx/wpsc.example.com-access.log combined buffer=64k flush=5m if=$loggable;
|
|
error_log /var/log/nginx/wpsc.example.com-error.log;
|
|
|
|
include "globals/assets.conf";
|
|
include "globals/restrictions.conf";
|
|
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
# Mitigate https://httpoxy.org/ vulnerabilities
|
|
fastcgi_param HTTP_PROXY "";
|
|
|
|
include fastcgi.conf;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_index index.php;
|
|
fastcgi_pass fpm;
|
|
|
|
add_header "X-Cache" "MISS";
|
|
}
|
|
|
|
include "globals/wp-super-cache.conf";
|
|
}
|