Apache2 Port map via Proxy but keep path

apache apache2 apache2.4

85 观看

1回复

3 作者的声誉

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

https://website/app

to send and receive data from local server on port

http://localIP:port/

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

http://localIP:port/something

Then this should be mapped back to

https://website/app/something

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


0

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     
</Location>

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

I also have a problem mapping website/app

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