From 4d9b52adf3993127c8a9cf5dea503d9ab3a51373 Mon Sep 17 00:00:00 2001 From: Rico Ullmann Date: Wed, 18 May 2022 15:51:43 +0200 Subject: [PATCH] nginx: add wordpress extras file for qzwi node --- data/nginx/files/extras/qzwi/wordpress | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 data/nginx/files/extras/qzwi/wordpress diff --git a/data/nginx/files/extras/qzwi/wordpress b/data/nginx/files/extras/qzwi/wordpress new file mode 100644 index 0000000..6807649 --- /dev/null +++ b/data/nginx/files/extras/qzwi/wordpress @@ -0,0 +1,35 @@ + location / { + # This is cool because no php is touched for static content. + # include the "?$args" part so non-default permalinks doesn't break when using query string + try_files $uri $uri/ /index.php?$args; + } + + location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { + expires max; + log_not_found off; + } + + location ~* /xmlrpc.php$ { + allow 127.0.0.1; + deny all; + } + + if ($request_method !~ ^(GET|POST)$ ) { + return 444; + } + + location ~ /\.(svn|git)/* { + deny all; + access_log off; + log_not_found off; + } + location ~ /\.ht { + deny all; + access_log off; + log_not_found off; + } + location ~ /\.user.ini { + deny all; + access_log off; + log_not_found off; + }