phpstudy apache 反代
vhosts.conf
<VirtualHost *:80>
ServerName www.test.com
ServerAlias www1.test.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
httpd.conf 里面取消注释以下两行 ,把#号去掉,
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
参考:
https://www.cnblogs.com/henshui/p/4977518.html
https://segmentfault.com/a/1190000005041026
https://www.jianshu.com/p/1f6f040bb648