logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: redirect to other apache services
Author
thierry.beeckmans



Joined: 17 Jul 2007
Posts: 2

PostPosted: Tue 17 Jul '07 17:01    Post subject: redirect to other apache services Reply with quote

I'm having difficulties while trying to redirect, depending on the url, to another apache service.

Following url's pct.be.sub, it-portal.be.sub all goes to http://192.109.60.81:80.
The apache service (on port 80) should, in case of pct.be.sub, go to another apache service (http://192.109.60.81:8081) which is configured with a php-module and another DocumentRoot.
Offcourse it-portal.be.sub corresponds to http://192.109.60.81:8082.

httpd-vhosts.conf contains:
Code:
NameVirtualHost *:80

<VirtualHost *:80/>
   ServerName pct.be.sub
   ErrorLog logs/pct.be.sub.log
   ProxyRequests Off
   ProxyPreserveHost On
   ProxyPass / http://localhost:8081/
   ProxyPassReverse / http://localhost:8081/
</VirtualHost>

I tried a whole day, but without the desired result.
All I get on pct.be.sub is "It works!" from the apache htdocs on port 80. Neutral

Thx in advance for any help
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 17 Jul '07 17:31    Post subject: Reply with quote

Theoretic it should work. I used this on a vhost from me, but I had some mod_proxy_html stuff in it which I removed. Maybe you need the html trasforming, too. Depends on the html on the other server.

Code:

<VirtualHost *:80>
    ServerName pct.be.sub
    ServerAlias www.pct.be.sub
    ErrorLog /server2/logs/pct.be.sub .error.log
    CustomLog /server2/logs/pct.be.sub .access.log common
    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/

<Location />
ProxyPassReverse /
</Location>

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

</VirtualHost>
Back to top
thierry.beeckmans



Joined: 17 Jul 2007
Posts: 2

PostPosted: Wed 18 Jul '07 9:13    Post subject: great :) Reply with quote

I tried your code and it works! Very Happy

Now I can try if my app still reacts like it should. I'm a newbie with vhosts, so I keep my fingers crossed.

Thx a lot Mr James Blond
Back to top


Reply to topic   Topic: redirect to other apache services View previous topic :: View next topic
Post new topic   Forum Index -> Apache