Home>Article>Operation and Maintenance> How to configure port forwarding in apache

How to configure port forwarding in apache

王林
王林 forward
2020-12-08 16:26:23 8069browse

How to configure port forwarding in apache

The specific method for Apache to configure port forwarding is as follows:

(Related recommendations:apache)

Remove the httpd.conf file #Comments

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so Include conf/extra/httpd-vhosts.conf

Configure httpd-vhosts.conf

 ProxyPreserveHost On ServerAdmin icytail@iyume.cn ServerName iyume.cn ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/   ProxyPreserveHost On ServerAdmin icytail@iyume.cn ServerName www.iyume.cn ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ 

Save and restart apache, and accessing (www.)iyume.cn will be forwarded to the 9000 port of this machine

The above is the detailed content of How to configure port forwarding in apache. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete