The best life is use of willing attitude, a happy-go-lucky life.
— Mr.Wang
		  		发布时间:2017-05-12 23:23:08
发布作者:admin
5689
反向代理可以实现这个功能,下面是详细的步骤:
步骤一:
查看httpd.conf是不是加载了mod_proxy.so,mod_proxy_http.so二个模块
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
步骤二:
配置apache的一个虚拟机
<VirtualHost *:80>  
    ServerAdmin admin@localhost  
    ServerName node.mrpzx.com
    ProxyRequests off     
    <Proxy *>  
            Order deny,allow  
            Allow from all     
    </Proxy>  
    <Location />  
            ProxyPass http://localhost:3000/         
            ProxyPassReverse http://localhost:3000/  
    </Location>  
</VirtualHost>
步骤三:
检查配置是否正确,并重新加载
[root@hatch ~]# apachectl -t Syntax OK
[root@hatch ~]# /etc/init.d/httpd reload
或者
[root@hatch ~]# service httpd restart