PRTG - Apache reverse proxy

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • LiquidSmoke
  • Registratie: Maart 2001
  • Laatst online: 28-09 09:10
Ik heb hier een ubuntu 15.10 machine die dienst doet als SSL proxy voor e.a. aan services.

Alle services zijn in een vhost opgenomen met een location tag:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<VirtualHost *:443>
    SSLProxyEngine on
    SSLEngine on
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyVia On

    <Location /service1>
        ProxyPass http://service1.domein.nl/
        ProxyPassReverse http://service1.domein.nl/
    </Location>
    <Location /service2>
        ProxyPass http://service2.domein.nl/
        ProxyPassReverse http://service2.domein.nl/
    </Location>
    <Location /service3>
        ProxyPass http://service3.domein.nl/
        ProxyPassReverse http://service3.domein.nl/
    </Location>

    ServerName proxy.domein.nl
    ServerAdmin webmaster@domein.nl
    DocumentRoot /var/www/html/

    <Directory "/var/www/html/">
        AuthName "Protected Area"
        AuthUserFile /etc/apache2/htpasswd/proxy.domein.nl
        AuthType Basic
        require valid-user

        AllowOverRide None
        order deny,allow
        deny from all
        Satisfy any
    </Directory>

    ErrorLog "/var/log/apache2/proxy.domein.nl-error_log"
    CustomLog "/var/log/apache2/proxy.domein.nl-access_log" common

    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

    SSLCertificateFile  /etc/apache2/ssl/proxy.domein.nl.crt
    SSLCertificateKeyFile /etc/apache2/ssl/proxy.domein.nl.key-unprot
    SSLCertificateChainFile "/etc/apache2/ssl/1_root_bundle.crt"
</VirtualHost>


Werkt als een zonnetje...

Nu wil ik daar echter PRTG aan toevoegen en dacht het volgende:

code:
1
2
3
4
    <Location /prtg>
        ProxyPass http://prtg.domein.nl/
        ProxyPassReverse http://prtg.domein.nl/
    </Location>


Echter krijg ik dan altijd een redirect naar https://proxy.domein.nl/index.htm

code:
1
2
192.168.0.10 - - [21/Mar/2016:19:09:44 +0100] "GET /prtg/ HTTP/1.1" 302 405
192.168.0.10 - - [21/Mar/2016:19:09:44 +0100] "GET /index.htm HTTP/1.1" 404 570


Op Paessler.com staat allen gebruik van een proxy icm een platte vhost, zonder de <location> tag. Dit werkt wel. Een recente post op hun forum geeft aan dat dev kijkt naar volledige reverse proxy ondersteuning, maar daarna is het stil.

Is dit iets wat met een rewrite afgehandeld kan worden, en heeft iemand een duwtje in de goede richting?

Acties:
  • 0 Henk 'm!

  • Thralas
  • Registratie: December 2002
  • Laatst online: 30-09 08:10
Die access log is afkomstig van je proxy? Lijkt erop dat de ProxyReverse niet werkt dan.

Ik kan niet helemaal beredeneren waarom niet. Wat wel opvalt verder:
If the first argument ends with a trailing /, the second argument should also end with a trailing /, and vice versa. Otherwise, the resulting requests to the backend may miss some needed slashes and do not deliver the expected results.
Gezien in jouw geval dat argument afkomstig is uit de Location, zou ik daar sowieso een trailing slash toevoegen. Maar of 't helpt?