加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Ubuntu中安装Nginx+Nagios

发布时间:2016-08-09 12:22:13 所属栏目:Linux 来源:站长网
导读:1. nagios安装 # wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.2.tar.gz # tar zxvf nagios-3.2.2.tar.gz # cd nagios-3.2.2 # use

nagios的完整WEB配置

     server {    
    listen          80;    
    server_name     1.1.1.2;    
    root            /usr/local/nagios/share;    
    index index.html index.htm index.php default.html default.htm default.php;    
        
    location ~ .*.php?$ {    
            fastcgi_pass    127.0.0.1:9000;    
            fastcgi_index   index.php;    
            include fastcgi_params;    
            fastcgi_param SCRIPT_FILENAME /usr/local/nagios/share$fastcgi_script_name;    
            auth_basic      "nagios admin";    
            auth_basic_user_file    /usr/local/nagios/etc/nagiosAdmin.net;    
     }    
    location ~ .*.cgi$ {    
            root    /usr/local/nagios/sbin;    
            rewrite ^/nagios/cgi-bin/(.*).cgi /$1.cgi break;    
            fastcgi_pass unix:/var/run/fcgiwrap.socket;    
            fastcgi_index index.cgi;    
            fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name;    
            include fastcgi_params;    
            auth_basic      "nagios admin";    
            auth_basic_user_file    /usr/local/nagios/etc/nagiosAdmin.net;    
        
    }    
    location /nagios {    
            alias /usr/local/nagios/share;    
            auth_basic      "nagios admin";    
            auth_basic_user_file    /usr/local/nagios/etc/nagiosAdmin.net;    
        
    }    
    location ~ .*.pl$ {    
            fastcgi_pass  unix:/var/run/fcgiwrap.socket;    
            fastcgi_index index.pl;    
            fastcgi_param SCRIPT_FILENAME  /usr/local/nagios/sbin$fastcgi_script_name;    
            include fastcgi_params;    
    }    
}

5、Nagios换主题

http://exchange.nagios.org/directory/Addons/Frontends-%28GUIs-and-CLIs%29/Web-Interfaces/Themes-and-Skins/Nuvola-Style/details

下载下来文件,然后解压,把html重命名为share。覆盖/usr/local/nagios/share即可,建立先备份原来的share。最终效果如下

Ubuntu中安装Nginx+Nagios

URL:http://www.bianceng.cn/OS/Linux/201410/46042.htm

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读