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
<VirtualHost *:80> ProxyPreserveHost On ServerAdmin icytail@iyume.cn ServerName iyume.cn ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ </VirtualHost> <VirtualHost *:80> ProxyPreserveHost On ServerAdmin icytail@iyume.cn ServerName www.iyume.cn ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ </VirtualHost>
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!