Browse Source

Break Nginx Conf In Multiple Common Locations

old-stable
Mitesh Shah 12 years ago
parent
commit
4beee7649b
  1. 36
      conf/nginx/common/locations.conf
  2. 2
      conf/nginx/conf.d/blockips.conf
  3. 5
      conf/nginx/conf.d/upstream.conf

36
conf/nginx/common/locations.conf

@ -0,0 +1,36 @@
# Common Locations
location = /favicon.ico {
access_log off;
log_not_found off;
expires max;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
# Security Settings For Better Privacy
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ /readme\.(txt|html)$ {
deny all;
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;
}
}

2
conf/nginx/conf.d/blockips.conf

@ -0,0 +1,2 @@
# Block IP Address
#deny 1.1.1.1;

5
conf/nginx/conf.d/upstream.conf

@ -0,0 +1,5 @@
# Common Upstream Settings
upstream php {
# server unix:/run/php5-fpm.sock;
server 127.0.0.1:9000;
}
Loading…
Cancel
Save