我是靠谱客的博主 机智哈密瓜,这篇文章主要介绍Zabbix 使用nginx做web服务,现在分享给大家,希望可以做个参考。

zabbix 使用nginx做web服务


逻辑图:

wKioL1iAV1LzKc_IAAE8OnYjAxY053.png-wh_50


yum  nginx装好,默认的default.conf文件直接backup掉,新建一个zabbx.conf文件,


#如果有报错看下nginx_log 日志排错,zabbix3.0.4nginx转发依赖./php-fpm -v

PHP 5.6.25,之前代理发现没用 报错也不是配置错误,查看官网发现是php-fpm版本问题。


10.10.254.25 zabbix_server服务器nginx配置: 

1
2
3
4
5
6
7
8
9
10
11
12
13
cat  zabbix.conf 
server
{
     listen 80;
     server_name _;
     index  index.html index.php;
     root  /usr/local/nginx/html ;
     location ~ .*.php$ {
         include fastcgi_params;
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}


}


外网机器做代理zabbix_server nginx(这里面的域名我已经改了,不要去尝试):

10.10.1.7nginx代理的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[ops]$  cat  zabbix34.ops.com.conf
server {
       listen       80;
       server_name  zabbix34.ops.com;
       allow 116.226.224.120 /32 ;
       allow 180.167.73.37 /32 ;
       allow 116.231.211.167 /32 ;
       deny all;
       #zabbix3.0.4
       location / {
           proxy_pass http: //10 .10.254.25/;
           proxy_set_header   Host    $host;
           proxy_set_header   X-Real-IP   $remote_addr;
           proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
       }
}



本文转自青衫解衣 51CTO博客,原文链接:http://blog.51cto.com/215687833/1893156

最后

以上就是机智哈密瓜最近收集整理的关于Zabbix 使用nginx做web服务的全部内容,更多相关Zabbix内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部