-   Linux - Server (
-   -   Any way to tunnel apache virtual host to an internal apache? (

ciuly 01-24-2010 02:23 PM

Any way to tunnel apache virtual host to an internal apache?
I am upgrading my server and I have a lot of sites. Since I cannot take my server down for a few days, maybe a week until I manage to migrate all the sites to the new machine, I figured I could migrate them one by one. After migrating one, I would somehow tunnel the requests of that name virtual host to my internal machine. When everything is migrated, I would then switch the machines, update ip's and stuff and everything will work just fine.

however I cannot seem to find a way to do this tunneling. is this at all possible? If not, what alternatives do I have?


kbp 01-24-2010 05:21 PM

I think mod_proxy will do the job for you...


ciuly 01-26-2010 04:26 PM

can you give a bit more info?
I tried making a reverse proxy since that's what I understood from googleing that I need.
so I have the following config:

LoadModule proxy_module modules/
LoadModule proxy_http_module modules/
Include conf/proxy_html.conf
<VirtualHost *:80>
#    DocumentRoot /www/

    ErrorLog logs/
    CustomLog logs/ combined

    ProxyRequests off
    ProxyPass /
    ProxyHTMLURLMap /
    ProxyPassReverse /
    ProxyHTMLEnable On
    ProxyHTMLURLMap /
    RequestHeader unset Accept-Encoding
</VirtualHost> is the new server. is the old server which also acts as a router and has the internet connection on it. the above httpd.conf is on

what happens is that I either get a 404 for articles OR I am being redirected to when logging in instead of
(the httpd.conf contains all the other needed stuff for apache I just posted the relevant stuff for this issue)
also, proxy_html.conf is the one from mod_proxy_html ( which I installed after the login redirect issue as it is advertised to fix that specific problem and more. after installing that and mod_xml2enc (same site) I started getting 404 everywhere.

any ideas what I am doing wrong?

ciuly 01-27-2010 04:31 PM

well, I would guess that mod_proxy can be configured somehow to do the job but I just couldn't and this already wasted 2 days of my time so I am now going to install the needed software for all sites with everything they need and test them "empty" and then take the server offline for a while, migrate the DB and get the server back online. hopefully it won't take long and everything will work fine.

thanks for your input anyway

phlyer 01-27-2010 05:23 PM

the simple ProxyPass works for me:

<IfModule mod_proxy.c>
ProxyRequests On
ProxyPass /maverick/

Hope that helps

ciuly 01-31-2010 12:53 PM

I bet it works, but what I needed was a reverse proxy ;)

All times are GMT -5. The time now is 09:24 PM.