Browse Source

Change Nginx Conf Files

old-stable
Mitesh Shah 12 years ago
parent
commit
e82134d6cd
  1. 3
      etc/nginx/common/locations.conf
  2. 2
      usr/share/easyengine/nginx/wpsingle/basic.conf
  3. 10
      usr/share/easyengine/nginx/wpsingle/w3tc.conf

3
etc/nginx/common/locations.conf

@ -63,7 +63,8 @@ location ~ /readme\.(txt|html)$ {
}
# Disallow PHP In Upload Folder
location /wp-content/uploads/{
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;

2
usr/share/easyengine/nginx/wpsingle/basic.conf

@ -9,7 +9,7 @@ server {
index index.php index.htm index.html;
location / {
try_files $uri $uri/ /index.php?$args;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {

10
usr/share/easyengine/nginx/wpsingle/w3tc.conf

@ -14,7 +14,7 @@ server {
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}
@ -22,7 +22,7 @@ server {
# Don't Cache Uris Containing The Following Segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}
}
# Don't Use The Cache For Logged In Users Or Recent Commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
@ -31,11 +31,11 @@ server {
# Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress
location / {
try_files /wp-content/cache/page_enhanced/$http_host/_index.html $uri $uri/ /index.php?$args;
}
try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri /index.php;
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass php;
}

Loading…
Cancel
Save