nginx如何針對(duì)目錄進(jìn)行IP限制
2016-08-18 09:03:34
11744
Nginx phpmyadmin 針對(duì)內(nèi)網(wǎng)ip用戶開(kāi)放、外網(wǎng)ip用戶關(guān)閉
server {
listen 80;
server_name example.com;
access_log logs/access.log main;
location / {
root html;
index index.PHP index.html index.htm;
}
location ~ ^/phpmyadmin/ {
allow 192.168.1.0/24;
deny all;
location ~ .*.(php|php5)?$ {
root /var/mailapp/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
location ~ .*.(php|php5)?$ {
root /opt/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
會(huì)員登錄
賬號(hào)登錄還沒(méi)有賬號(hào)?立即注冊(cè)