Home >Backend Development >PHP Tutorial >Reverse proxy Nagios with Nginx

Reverse proxy Nagios with Nginx

WBOY
WBOYOriginal
2016-07-29 09:15:241087browse

1 Environment preparation

  • Operating system
<code>CentOS 7.0 x86_64</code>
  • Nginx version
<code>nginx-1.7.10</code>

2 Install Nginx

  • New user group and user
<code><span># useradd nginx -s /sbin/nologin</span><span># id nginx</span></code>
  • Install dependent files
<code>yum install pcre<span>-devel</span> openssl<span>-devel</span></code>
  • Install Nginx
<code><span># wget 'http://nginx.org/download/nginx-1.7.10.tar.gz'</span><span># tar xzvf nginx-1.7.10.tar.gz</span><span># cd nginx-1.7.10</span><span># </span><span># ./configure   --prefix=/home/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_flv_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre</span><span># make && make install</span></code>

3 Configure reverse proxy

  • Modify nginx.conf
<code>        location /nagios {
            proxy_pass    http:<span>//192.168.10.51:8000/nagios;</span>
        }</code>
  • Start nginx
<code><span># cd /home/nginx</span><span># ./sbin/nginx -c ./conf/nginx.conf</span></code>

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the use of Nginx reverse proxy Nagios, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn