Browse Source

Separate WP From PHP And Common WordPress Setttings

old-stable
Mitesh Shah 12 years ago
parent
commit
a7f46e2a3a
  1. 10
      etc/nginx/common/wpcommon.conf
  2. 2
      usr/local/sbin/easyengine
  3. 24
      usr/share/easyengine/nginx/php/basic.conf
  4. 9
      usr/share/easyengine/nginx/wp/basic.conf
  5. 9
      usr/share/easyengine/nginx/wp/w3tc.conf
  6. 9
      usr/share/easyengine/nginx/wp/wpfc.conf
  7. 9
      usr/share/easyengine/nginx/wp/wpsc.conf
  8. 9
      usr/share/easyengine/nginx/wpsubdir/basic.conf
  9. 9
      usr/share/easyengine/nginx/wpsubdir/w3tc.conf
  10. 9
      usr/share/easyengine/nginx/wpsubdir/wpfc.conf
  11. 9
      usr/share/easyengine/nginx/wpsubdir/wpsc.conf
  12. 9
      usr/share/easyengine/nginx/wpsubdomain/basic.conf
  13. 9
      usr/share/easyengine/nginx/wpsubdomain/w3tc.conf
  14. 9
      usr/share/easyengine/nginx/wpsubdomain/wpfc.conf
  15. 9
      usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

10
etc/nginx/common/wpcommon.conf

@ -0,0 +1,10 @@
# WordPress Common Settings
# Disallow PHP In Upload Folder
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}

2
usr/local/sbin/easyengine

@ -1330,7 +1330,7 @@ then
EESITENAME EESITENAME
# Creating Website $DOMAIN # Creating Website $DOMAIN
NGINXCONF=wp/basic.conf NGINXCONF=php/basic.conf
EEDOMAINSETUP EEDOMAINSETUP
EEPERMISSION EEPERMISSION

24
usr/share/easyengine/nginx/php/basic.conf

@ -0,0 +1,24 @@
# PHP NGINX CONFIGURATION
server {
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;
index index.php index.htm index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass php;
}
include /etc/nginx/common/locations.conf;
}

9
usr/share/easyengine/nginx/wp/basic.conf

@ -19,14 +19,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wp/w3tc.conf

@ -45,14 +45,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wp/wpfc.conf

@ -51,13 +51,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wp/wpsc.conf

@ -41,13 +41,6 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdir/basic.conf

@ -37,14 +37,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdir/w3tc.conf

@ -59,14 +59,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdir/wpfc.conf

@ -69,13 +69,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdir/wpsc.conf

@ -59,14 +59,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdomain/basic.conf

@ -25,14 +25,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdomain/w3tc.conf

@ -47,14 +47,7 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdomain/wpfc.conf

@ -57,13 +57,6 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

9
usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

@ -50,14 +50,7 @@ server {
fastcgi_param SERVER_NAME $http_host; fastcgi_param SERVER_NAME $http_host;
} }
# Disallow PHP In Upload Folder include /etc/nginx/common/wpcommon.conf;
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}
include /etc/nginx/common/locations.conf; include /etc/nginx/common/locations.conf;
} }

Loading…
Cancel
Save