码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix监控系统中nginx的配置

时间:2015-08-27 15:34:20      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

http 段的配置:

include	   mime.types;
default_type  application/octet-stream;
log_format  main  ‘$remote_addr - $remote_user [$time_local] "$request" ‘
          ‘$status $body_bytes_sent "$http_referer" ‘
          ‘"$http_user_agent" "$http_x_forwarded_for"‘;
sendfile  on;
keepalive_timeout  65;
server {
	listen	80;
	server_name  123.XXX.XXX.69;
	access_log  /data/logs/nginx/access.log    main;
	location {
		root	/usr/local/lnmp/nginx/html;
		index	index.html index.htm index.php;
	}
	error_page	500 502 503 504    /50x.html;
	location = /50x.html {
	}
	location ~ ^(.+.php)(.*)$ {
		fastcgi_split_path_info ^(.+.php)(.*)$;
		include fastcgi.conf;
		fastcgi_pass  127.0.0.1:9000;
		fastcgi_index index.php;
		fastcgi_param  PATH_INFO          $fastcgi_path_info;
	}
}

把zabbix前端目录放在nginx的发布目录下,并给前端目录设置用户组 nginx 用户主  nginx :

技术分享


zabbix监控系统中nginx的配置

标签:

原文地址:http://my.oschina.net/moonly/blog/497926

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!