反向代理apache配置

反向代理apache配置

httpd-vhost.conf

    <VirtualHost *:80>
    ServerName www.myapp.com
    DocumentRoot "f:/git/vue"
    <Directory  "f:/git/vue/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
    </Directory>
    
    ProxyRequests Off 
        <Proxy *> 
              Order deny,allow 
              Allow from all 
        </Proxy> 
     ProxyPass /api http://op.juhe.cn
    </VirtualHost>

配置完成之后 访问 http://www.myapp.com/api 和 http://op.juhe.cn 一样

参考文档

标签: 反向代理

添加新评论