|
|
@ -20,48 +20,38 @@ location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif |
|
|
|
expires max; |
|
|
|
} |
|
|
|
|
|
|
|
# PMA Settings |
|
|
|
location /pma { |
|
|
|
root /var/www/shared; |
|
|
|
|
|
|
|
# EasyEngine Shared Settings |
|
|
|
location /ee { |
|
|
|
autoindex on; |
|
|
|
alias /var/www/shared/; |
|
|
|
include common/allowed_ip.conf; |
|
|
|
index index.php index.html index.htm; |
|
|
|
|
|
|
|
location ~ ^/pma/(.+\.php)$ { |
|
|
|
try_files $uri =404; |
|
|
|
root /var/www/shared; |
|
|
|
location ~ ^/ee(.+\.php)$ { |
|
|
|
alias /var/www/shared$1; |
|
|
|
fastcgi_pass php; |
|
|
|
fastcgi_index index.php; |
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
|
|
|
include /etc/nginx/fastcgi_params; |
|
|
|
} |
|
|
|
|
|
|
|
location ~* ^/pma/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { |
|
|
|
root /var/www/shared; |
|
|
|
location ~* ^/ee(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { |
|
|
|
alias /var/www/shared$1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# PMA Settings |
|
|
|
location /pma { |
|
|
|
rewrite ^/* /ee/pma last; |
|
|
|
} |
|
|
|
|
|
|
|
location /phpMyAdmin { |
|
|
|
rewrite ^/* /pma last; |
|
|
|
rewrite ^/* /ee/pma last; |
|
|
|
} |
|
|
|
|
|
|
|
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 |
|
|
|
location /nginx_status { |
|
|
@ -76,6 +66,7 @@ location ~ ^/(status|ping) { |
|
|
|
include common/allowed_ip.conf; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Security Settings For Better Privacy |
|
|
|
|
|
|
|
location ~ /\. { |
|
|
@ -95,12 +86,3 @@ location ~ /readme\.(txt|html)$ { |
|
|
|
access_log 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; |
|
|
|
} |
|
|
|
} |