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

How to configure port forwarding in apache

王林
Release: 2020-12-08 16:26:23
forward
8328 people have browsed it

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
Copy after login

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>
Copy after login

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template