ports/www/phpmyadmin/files/phpMyAdmin-nginx.conf

30 lines
1.4 KiB
Text

index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}
location /phpMyAdmin/ {
allow 127.0.0.1;
deny all;
if ($request_method !~ "^(GET|POST)$"){
return 403;
}
if ($http_user_agent ~* "^(java|curl|wget).*"){
return 403;
}
if ($http_user_agent ~* "^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).*"){
return 403;
}
if ($http_user_agent ~* "^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).*"){
return 403;
}
if ($http_user_agent ~* "^.*(AdsBot-Google|ia_archiver|Scooter|Ask.Jeeves|Baiduspider|Exabot|FAST.Enterprise.Crawler|FAST-WebCrawler|www\.neomo\.de|Gigabot|Mediapartners-Google|Google.Desktop|Feedfetcher-Google|Googlebot|heise-IT-Markt-Crawler|heritrix|ibm.com\cs/crawler|ICCrawler|ichiro|MJ12bot|MetagerBot|msnbot-NewsBlogs|msnbot|msnbot-media|NG-Search|lucene.apache.org|NutchCVS|OmniExplorer_Bot|online.link.validator|psbot0|Seekbot|Sensis.Web.Crawler|SEO.search.Crawler|Seoma.\[SEO.Crawler\]|SEOsearch|Snappy|www.urltrends.com|www.tkl.iis.u-tokyo.ac.jp/~crawler|SynooBot|crawleradmin.t-info@telekom.de|TurnitinBot|voyager|W3.SiteSearch.Crawler|W3C-checklink|W3C_Validator|www.WISEnutbot.com|yacybot|Yahoo-MMCrawler|Yahoo\!.DE.Slurp|Yahoo\!.Slurp|YahooSeeker).*"){
return 403;
}
}