Apache2 Port map via Proxy but keep path

apache apache2 apache2.4

85 观看


3 作者的声誉

I have a https://website I want to map


to send and receive data from local server on port


And if http://localIP:port/ returns something


Then this should be mapped back to


I want to keep https://website/app/ for all the links of localserver

Using Apache 2.4.25 on Debian

Any config examples would be of great help... Searched online for solution

Here is what happens for my current configuration

The ip:port/something is mapped to website/something not website/app/something

作者: user8637594 的来源 发布者: 2017 年 12 月 27 日

回应 1


16 作者的声誉


Inside VirtualHost this is my WORKING config

MY CONFIG works for your website/app/

CLIENT ---- INTERNET ---- ROUTER ---- (lan) ---- (https)APACHE + (http)LOCAL

ProxyPass /app/ http://<IP>:<PORT>/     
ProxyPassReverse /app/ http://<IP>:<PORT>/  
ProxyHTMLURLMap http://<IP>:<PORT>/ /app/   
<Location /app/>
    ProxyHTMLEnable On                                     #### v2.1 min
    ProxyHTMLExtended on
    ProxyPassReverse /
    ProxyHTMLURLMap http://<IP>:<PORT> /app/
    ProxyHTMLURLMap / /app/
    ProxyHTMLURLMap /app/ /app/
    RequestHeader unset Accept-Encoding

    #AuthType Basic
    #AuthName "Restricted Content"
    #AuthUserFile /LINK/TO/.htpasswd/FILE
    #Require valid-user     

The above maps website/app/ but doesn't work for website/app

I also have a problem mapping website/app

作者: Luffy 发布者: 2017 年 12 月 28 日