You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.0 KiB

# Common Locations
12 years ago
# Basic Locations Files
location = /favicon.ico {
access_log off;
log_not_found off;
expires max;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
# Cache Static Files For As Long As Possible
location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
}
12 years ago
# PMA Settings
location /pma {
root /var/www/shared;
12 years ago
index index.php index.html index.htm;
location ~ ^/pma/(.+\.php)$ {
12 years ago
try_files $uri =404;
root /var/www/shared;
12 years ago
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;
12 years ago
}
}
location /phpMyAdmin {
rewrite ^/* /pma last;
12 years ago
}
location /phpmyadmin {
rewrite ^/* /pma last;
12 years ago
}
# 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;
}
}
12 years ago
# Status Pages
location /nginx_status {
stub_status on;
access_log off;
include common/allowed_ip.conf;
}
location ~ ^/(status|ping) {
include fastcgi_params;
fastcgi_pass php;
include common/allowed_ip.conf;
}
12 years ago
# Security Settings For Better Privacy
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~* ^.+\.log$ {
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;
}
12 years ago
}