zabbix安全方面配置
本地host配置
公网Ip 域名
4.4.4.4 www.yhtzabbix.com
红色为域名配置
蓝色为直接域名访问
紫色为黑白名单配置
user www;
worker_processes1;
events {
worker_connections1024;
}
http {
include mime.types;
default_typeapplication/octet-stream;
sendfile on;
keepalive_timeout65;
server {
listen 80;
server_namewww.yhtzabbix.com;
if ($host != 'www.yhtzabbix.com') {
rewrite ^/(.*)$ http://yht1990.blog.51cto.com/$1 permanent;
}
location/ {
#root html;
root/usr/local/nginx/html/zabbix/;
indexindex.php index.html index.htm;
}
location ~ \.php$ {
#root html;
root/usr/local/nginx/html/zabbix/;
allow 119.130.231.201;
deny all;
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#auth_basic "nginx basic http test for ttlsa.com";
#auth_basic_user_file conf/htpasswd;
#autoindex on;
include fastcgi_params;
}
error_page 500 502 503 504/50x.html;
location = /50x.html {
root html;
}
}
}
页:
[1]