Mark Apache port forwarding proxy

Mark Apache port forwarding proxy

Http 服务器 4 years ago 4353 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/
LoadModule proxy_connect_module libexec/apache2/
LoadModule proxy_ftp_module libexec/apache2/
LoadModule proxy_http_module libexec/apache2/

LoadModule proxy_ajp_module libexec/apache2/
LoadModule proxy_balancer_module libexec/apache2/

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  
    ProxyPass /
    ProxyPassReverse /

resert Apache

service apache reload

Visiting the assigned URL works!


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