Apache configure port forwarding

Remove the #comment from the httpd.conf file

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 [email protected]

       ServerName iyume.cn

       ProxyPass / http://127.0.0.1:9000/

       ProxyPassReverse / http://127.0.0.1:9000/

</VirtualHost>

<VirtualHost *:80>

       ProxyPreserveHost On

       ServerAdmin [email protected]

       ServerName www.iyume.cn

       ProxyPass / http://127.0.0.1:9000/

       ProxyPassReverse / http://127.0.0.1:9000/

</VirtualHost>

 

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326656786&siteId=291194637