Mark Apache port forwarding proxy

Mark Apache port forwarding proxy

Http 服务器 11 months ago 460 0

Recently, we are doing WeChat public account. Since the code is local, and the WeChat public platform requires an online website, you need to put the code on the public network for execution.

My leader helped me assign a subdomain to my ip, this only learned that he was using frp. And I just use proxy forwarding. Following is my code:

Apache setting:

edit Http.conf file

open httpd-vhosts.conf

Include /private/etc/apache2/extra/httpd-vhosts.conf

Open proxy configuration


LoadModule proxy_module libexec/apache2/mod_proxy.so
LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so
LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so

LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so
LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so

update httpd-vhosts.conf

Replace the following


<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName test.local

    ProxyPreserveHost On
    ProxyRequests Off

    <Proxy />  
        Order deny,allow  
        Allow from all  
    </Proxy>  
    ProxyPass / http://192.168.10.10/
    ProxyPassReverse / http://192.168.10.10/
</VirtualHost>

resert Apache

service apache reload

Visiting the assigned URL works!

原文: http://yiqiao.me/articles/19/record-an-apache-port-forwarding-agent

版权声明: 自由转载-非商用-非衍生-保持署名 (创意共享3.0许可证)