Redirects, Proxies and external port mappings: What in which scenario?

Discussion in 'Installation/Configuration' started by MarsWarrior, Apr 20, 2015.

  1. MarsWarrior

    MarsWarrior New Member

    Note: I think I posted this in the wrong forum: should have gone into the ISPConfig subforum...

    After a few weeks of experimenting / learning ISPConfig I have setup two (virtual) Ubuntu servers @ home running on my Windows server.
    One will be used as a production server, and the other one for testing and running Munin monitor, PIWIK, and some WordPress test sites before they will go into production on the production server.

    I have defined two subdomains in my DNS list for my servers at my isp:
    As my router has trouble with NAT loopbacks, I defined both servers' local IP addresses in my hosts file.

    Furthermore I mapped two HTTP ports on my router:
    • 80 (outside) -> 80 (inside) to my production server
    • 480 (outside) -> 80 (inside) to my test server
    The idea behind this setup is:
    1. Be able to access both servers independent of each other from the outside @ port 80 and @ port 480
    2. Access both servers and sites using the production server @ port 80:
      •* -> production server
      •* -> test server
    For some reason, things just don't work as expected, or just don't work. So I'm doing something wrong, or ISPConfig is doing something under the hood, which I'm not aware of.

    Access via port 480 does not work:
    • I can access, but then run into some timeout. It seems that port 480 is redirected to port 80, which will go to the production server which is not running munin. The same problem is with WordPress: in this case 480 is also redirected (as I see the URL changing in my web browser) to port 80.
    • I have other websites running on port 1234 on Windows which don't exhibit this 'redirect' behaviour, and I just can't find what is causing this behaviour in the case of ISPConfig driven websites...
    Redirecting from production server to test server does not work:
    • I don't seem to be able to get the production server redirect/proxy all traffic from to the test server.
    • I understand I have to use a proxy/proxypass in the apache directives field, and not some redirect. But what should I create to make this work? A website, a subdomain, or a subdomain (vhost)?
    In other words: some 'how to' examples and/or explanations why some things don't work, or should be done different in ISPConfig are more than welcome. I will need more of this kind of configurations in the future, so I need to document how this MUST be done!

    Note 1:
    I did add this in the options for the website at the site of the production server to proxy this website to the test server:
    ProxyRequests off
    ProxyPreserveHost On
    ProxyPass /
    ProxyPassReverse /
    ProxyPassReverseCookiePath /
    Everything seems to work as long as I do normal things, but as soon as I try to upload images to this wordpress site, I get HTTP errors:
    [Mon Apr 20 21:23:33.032470 2015] [proxy_http:error] [pid 40838] (104)Connection reset by peer: [client] AH02609: read request body failed to ( from (), referer:
    [Mon Apr 20 21:23:33.032564 2015] [proxy_http:error] [pid 40838] [client] AH01097: pass request body failed to ( from (), referer:
    [Mon Apr 20 21:23:33.033288 2015] [proxy_http:error] [pid 40838] (70008)Partial results are valid but processing is incomplete: [client] AH01095: prefetch request body failed to ( from (), referer:
    I did try setting nokeepalive and chunked transfer (SetEnv proxy-nokeepalive 1, SetEnv proxy-sendchunked 1), but that doesn't help at all
    Last edited: Apr 20, 2015

Share This Page