Zabbix–使用Nginx替换httpd
项目使用Nginx进行了负载,在搭建Zabbix过程中,启动httpd时,发现了端口占用(80)问题,因改端口麻烦,将Zabbix涉及的php的web容器替换为Nginx。
编辑Nginx配置文件
server {
listen 80;
location /zabbix {
alias /usr/share/zabbix;
index index.html index.htm index.php;
}
location ^~ /app {
deny all;
}
location ^~ /conf {
deny all;
}
location ^~ /local {
deny all;
}
location ^~ /include {
deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ ^/zabbix/.+\.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share$fastcgi_script_name;
include fastcgi_params;
}
}