Browse Source

Add redirection for the adminer memcache and opcache

old-stable
Mitesh Shah 11 years ago
parent
commit
25d9ce16e5
  1. 63
      etc/nginx/common/locations.conf

63
etc/nginx/common/locations.conf

@ -21,25 +21,27 @@ location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gi
} }
# EasyEngine Admin Tools # Security Settings For Better Privacy
# PMA Settings # Deny Hidden Files
location /pma { location ~ /\. {
return 301 $scheme://$host:22222/db/pma; deny all;
access_log off;
log_not_found off;
} }
location /phpMyAdmin { # Deny Backup Extensions & Log Files
return 301 $scheme://$host:22222/db/pma; location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp)$ {
deny all;
access_log off;
log_not_found off;
} }
location /phpmyadmin { # Return 403 Forbidden For readme.(txt|html) or license.(txt|html)
return 301 $scheme://$host:22222/db/pma; if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
return 403;
} }
# Adminer Settings
location /adminer {
return 301 $scheme://$host:22222/db/adminer/;
}
# Status Pages # Status Pages
location /nginx_status { location /nginx_status {
@ -55,23 +57,32 @@ location ~ ^/(status|ping) {
} }
# Security Settings For Better Privacy # EasyEngine Admin Tools
# Deny Hidden Files # PMA Settings
location ~ /\. { location /pma {
deny all; return 301 $scheme://$host:22222/db/pma;
access_log off;
log_not_found off;
} }
# Deny Backup Extensions & Log Files location /phpMyAdmin {
location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp)$ { return 301 $scheme://$host:22222/db/pma;
deny all;
access_log off;
log_not_found off;
} }
# Return 403 Forbidden For readme.(txt|html) or license.(txt|html) location /phpmyadmin {
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") { return 301 $scheme://$host:22222/db/pma;
return 403; }
# Adminer Settings
location /adminer {
return 301 $scheme://$host:22222/db/adminer/;
}
# Memcache Settings
location /memcache {
return 301 $scheme://$host:22222/php/memcache/;
}
# Opcache Settings
location /opcache {
return 301 $scheme://$host:22222/php/opcache/;
} }

Loading…
Cancel
Save