关于apache 的proxy_pass记录

 

使用这个功能需要开启apache的2个模块分别是:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

httpd-vhosts 参考配置:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot F:/ca/Mobile/qianduan/dev
    ServerName mobile.cc
    ServerAlias mobile.cc
    ErrorLog “logs/mobile-error.log”
    CustomLog “logs/mobile-access.log” common
    ProxyPreserveHost Off
    ProxyRequests Off
    ProxyPass  /api http://api.cc/api
    ProxyPassReverse /api  http://api.cc/api
</VirtualHost>