istike2
Goto Top

Apache ReverseProxy auf Webserver-Folder

Hallo zusammen,

ich bin gerade dabei ein ReverseProxy Config einzurichten:

    1. Proxy Eintraege - Weiterleitung nur ein Ordner des Hosts (und alles darunter)
    <Location />
    ProxyPass http://webserver:8095/ timeout=1200
    ProxyPassReverse http://webserver:8095
    </location>

    Die Weiterleitung funktioniert von 443 auf 8095 und ich komme auch auf die Internetseite.
    Ich würde aber gerne noch auf einen Folder weiterleiten, damit ich in der Browser-Adressenzeile nicht noch https://internetseite/folder eingeben muss.

    Wo soll ich es in der RP-Config festlegen?

    so funktioniert es leider nicht:

      1. Proxy Eintraege - Weiterleitung nur ein Ordner des Hosts (und alles darunter)
      <Location />
      ProxyPass http://webserver:8095/folder timeout=1200
      ProxyPassReverse http://webserver:8095/folder
      </location>

      Hat jemand einen Vorschlag?

      LG

      I2

Content-ID: 12361290758

Url: https://administrator.de/contentid/12361290758

Printed on: September 1, 2024 at 08:09 o'clock

erikro
erikro Aug 08, 2024 at 09:34:09 (UTC)
Goto Top
Moin,

Zitat von @istike2:
Hat jemand einen Vorschlag?

Handbuch lesen:

Simple reverse proxying
The ProxyPass directive specifies the mapping of incoming requests to the backend server (or a cluster of servers known as a Balancer group). The simplest example proxies all requests ("/") to a single backend:

ProxyPass "/" "http://www.example.com/"
To ensure that and Location: headers generated from the backend are modified to point to the reverse proxy, instead of back to itself, the ProxyPassReverse directive is most often required:

ProxyPass "/" "http://www.example.com/"
ProxyPassReverse "/" "http://www.example.com/"
Only specific URIs can be proxied, as shown in this example:

ProxyPass "/images" "http://www.example.com/"
ProxyPassReverse "/images" "http://www.example.com/"
In the above, any requests which start with the /images path with be proxied to the specified backend, otherwise it will be handled locally.
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html

hth

Erik
istike2
istike2 Aug 08, 2024 updated at 10:13:43 (UTC)
Goto Top
Vielen Dank!
Ja, das mit Lesen ist schon echt praktisch und ist sicherlich vom Vorteil face-smile
ThePinky777
ThePinky777 Aug 08, 2024 updated at 11:22:00 (UTC)
Goto Top
Zitat von @istike2:

Vielen Dank!
Ja, das mit Lesen ist schon echt praktisch und ist sicherlich vom Vorteil face-smile

ja sonst wären wir ja auch nicht besser als user

Es gilt immer RTFM face-smile
how users see programmers