apache wamp windows上做反向代理

2020-07-30 17:55:47

1、打开httpd.conf,找到以下几个Module并将其启用(如果没有,可以自行添加)

   mod_proxy.so(module_proxy) 
    mod_proxy_http.so(module_proxy_http)                 
   mod_cache.so(module_cache) 
    mod_disk_cache.so(module_disk_cache)

2、httpd.conf 中,增加如下代码


    ServerName api.leqiyun.com
    ProxyRequests Off
    
    Order deny,allow
    Allow from all
    
    ProxyPass / http://127.0.0.1:1323/
    ProxyPassReverse / http://127.0.0.1:1323/

3、然后修改系统的hosts 文件,增加一行

127.0.0.1  api.leqiyun.com