CentOS 7
Sponsored Link

Apache httpd : Configure mod_proxy#12015/08/03

 
Enable mod_proxy module to configure forward proxy settings.
[1] mod_proxy is included in httpd package and it is enabled by default, so it's possible to configure quickly.
# module is enabled by default

[root@www ~]#
grep "mod_proxy" /etc/httpd/conf.modules.d/00-proxy.conf

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
.....
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so

[root@www ~]#
vi /etc/httpd/conf.d/f_proxy.conf
# create new

<IfModule mod_proxy.c>
   
# forward proxy function ON

    ProxyRequests On
    <Proxy *>
       
# access permission

        Require ip 127.0.0.1 10.0.0.0/24
    </Proxy>
</IfModule>
[root@www ~]#
vi /etc/httpd/conf/httpd.conf
# line 42: change listening port

Listen
8080
[root@www ~]#
systemctl restart httpd

[2] If Firewalld is running, allow proxy port set on above section.
[root@www ~]#
firewall-cmd --add-port=8080/tcp --permanent

success
[root@www ~]#
firewall-cmd --reload

success
[3] If SELinux is enabled, change boolean value.
[root@www ~]#
setsebool -P httpd_can_network_relay on

[4]
Configure Proxy client setiings on a Client and make sure it's possible to access to any websites normally.
Matched Content