Home >Backend Development >PHP Tutorial >Reverse proxy Nagios with Nginx
1 Environment preparation
<code>CentOS 7.0 x86_64</code>
<code>nginx-1.7.10</code>
2 Install Nginx
<code><span># useradd nginx -s /sbin/nologin</span><span># id nginx</span></code>
<code>yum install pcre<span>-devel</span> openssl<span>-devel</span></code>
<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
<code> location /nagios { proxy_pass http:<span>//192.168.10.51:8000/nagios;</span> }</code>
<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.