Browse Source

Remove WordPress Settings From Locations.conf and Change Shared Folder Settings

old-stable
Mitesh Shah 12 years ago
parent
commit
529b8db317
  1. 54
      etc/nginx/common/locations.conf
  2. 8
      usr/share/easyengine/nginx/wp/basic.conf
  3. 8
      usr/share/easyengine/nginx/wp/w3tc.conf
  4. 8
      usr/share/easyengine/nginx/wp/wpfc.conf
  5. 8
      usr/share/easyengine/nginx/wp/wpsc.conf
  6. 8
      usr/share/easyengine/nginx/wpsubdir/basic.conf
  7. 8
      usr/share/easyengine/nginx/wpsubdir/w3tc.conf
  8. 8
      usr/share/easyengine/nginx/wpsubdir/wpfc.conf
  9. 8
      usr/share/easyengine/nginx/wpsubdir/wpsc.conf
  10. 8
      usr/share/easyengine/nginx/wpsubdomain/basic.conf
  11. 8
      usr/share/easyengine/nginx/wpsubdomain/w3tc.conf
  12. 8
      usr/share/easyengine/nginx/wpsubdomain/wpfc.conf
  13. 8
      usr/share/easyengine/nginx/wpsubdomain/wpsc.conf

54
etc/nginx/common/locations.conf

@ -20,48 +20,38 @@ location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif
expires max; expires max;
} }
# PMA Settings
location /pma { # EasyEngine Shared Settings
root /var/www/shared; location /ee {
autoindex on;
alias /var/www/shared/;
include common/allowed_ip.conf;
index index.php index.html index.htm; index index.php index.html index.htm;
location ~ ^/pma/(.+\.php)$ { location ~ ^/ee(.+\.php)$ {
try_files $uri =404; alias /var/www/shared$1;
root /var/www/shared;
fastcgi_pass php; fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params; include /etc/nginx/fastcgi_params;
} }
location ~* ^/pma/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { location ~* ^/ee(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /var/www/shared; alias /var/www/shared$1;
} }
} }
# PMA Settings
location /pma {
rewrite ^/* /ee/pma last;
}
location /phpMyAdmin { location /phpMyAdmin {
rewrite ^/* /pma last; rewrite ^/* /ee/pma last;
} }
location /phpmyadmin { location /phpmyadmin {
rewrite ^/* /pma last; rewrite ^/* /ee/pma last;
} }
# Opcahe Pages
location /opcache {
root /var/www/shared;
include common/allowed_ip.conf;
index index.php index.html index.htm;
location ~ ^/opcache/(.+\.php)$ {
try_files $uri =404;
root /var/www/shared;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}
# Status Pages # Status Pages
location /nginx_status { location /nginx_status {
@ -76,6 +66,7 @@ location ~ ^/(status|ping) {
include common/allowed_ip.conf; include common/allowed_ip.conf;
} }
# Security Settings For Better Privacy # Security Settings For Better Privacy
location ~ /\. { location ~ /\. {
@ -95,12 +86,3 @@ location ~ /readme\.(txt|html)$ {
access_log off; access_log off;
log_not_found off; log_not_found off;
} }
# Disallow PHP In Upload Folder
location /wp-content/uploads/ {
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}

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

@ -19,6 +19,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -45,6 +45,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -51,5 +51,13 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -41,5 +41,13 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -37,6 +37,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -59,6 +59,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -69,5 +69,13 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -59,6 +59,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -25,6 +25,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -47,6 +47,14 @@ server {
fastcgi_pass php; fastcgi_pass php;
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -57,5 +57,13 @@ server {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
} }
# Disallow PHP In Upload Folder
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;
} }

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

@ -50,6 +50,14 @@ server {
fastcgi_param SERVER_NAME $http_host; fastcgi_param SERVER_NAME $http_host;
} }
# Disallow PHP In Upload Folder
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