这个是将8080端口转发到80端口,使用场景如:1. 给Django服务设置域名或者IP访问;2. 给node服务设置域名或者IP访问。

全部写法如下

<VirtualHost *:80>  ServerName localhost  ServerAlias localhost  DocumentRoot "${INSTALL_DIR}/www"  <Directory "${INSTALL_DIR}/www/">    Options +Indexes +Includes +FollowSymLinks +MultiViews    AllowOverride All    Require all granted  </Directory>  	# 开始-apache反向代理	ProxyRequests Off		#apache的监听其他端口	<proxy http://127.0.0.1:8080>	  AllowOverride None	  Order Deny,Allow	  Allow from all	</proxy>		ProxyPass / http://127.0.0.1:8080	ProxyPassReverse / http://127.0.0.1:8080	# 结束-apache反向代理  </VirtualHost>

如下图:

可能是这种写法也
 ProxyPass /test http://www.baidu.com:8082/test
    ProxyPassReverse /test http://www.baidu.com:8082/test

4 对 “Apache设置反向代理转发端口”的想法;

发表评论

邮箱地址不会被公开。 必填项已用*标注

1,055 次浏览