Configure 2 apache for the same host, different dir address

Alles, was den Apache betrifft, kann hier besprochen werden.

Configure 2 apache for the same host, different dir address

Postby tef » 18. November 2010 13:11

Hi, i can't find a solution for a configuration.

I've 2 servers with apache installed
I've my domain configured to the first server. something like this

http://www.myuselesssite.com

i have to find a solution to put on the second web server some subdirectory:

http://www.myuselesssite.com/subdomain1

all files of the subdomains have to stay into webserver2
When someone try to access to http://www.myuselsssite.com/subdomain1 he must read the virtualhost on the webserver2 and if possible don't change the address bar url.

I can configure the webserver2 to be subdomain1.myuselesssite.com but i've to show on addressbar http://www.myuselesssite.com/subdomain1


is it possible with rewrite rules? How can i?
tef
 
Posts: 2
Joined: 18. November 2010 13:00

Re: Configure 2 apache for the same host, different dir addr

Postby glitzi85 » 19. November 2010 14:17

Enable mod_proxy on the first Server, where you're domain points to. Then put that into the configuration:

Code: Select all
ProxyRequests Off

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

ProxyPass /subdomain1 http://subdomain1.example.com
ProxyPassReverse /subdomain1 http://subdomain1.example.com


glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: Configure 2 apache for the same host, different dir addr

Postby tef » 19. November 2010 16:41

Is this the only way?
With rewritecond i can't?
tef
 
Posts: 2
Joined: 18. November 2010 13:00

Re: Configure 2 apache for the same host, different dir addr

Postby Nobbie » 19. November 2010 22:22

tef wrote:Is this the only way?
With rewritecond i can't?


In a "something like this" environment something like this is the solution for something like this.
Nobbie
 
Posts: 8779
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 2 guests