Apache sever web pages by Document Root?

Support for webhosts that use CentOS
Post Reply
ddrysdale
Posts: 42
Joined: 2005/05/14 00:49:20
Location: New Brunswick Canada
Contact:

Apache sever web pages by Document Root?

Post by ddrysdale » 2005/09/19 11:16:48

I have a strange Apache question. I want to be able to access virtual servers by ip and Document Root.

[b]Background[/b]
I am running Centos 4.1+ all updates.
Apache php5 mysql all up and running.
Name based virtual hosting is working.
I have ten web sites on it now and if I forward port 80 to the server DNS resolves everything fine and virtual web sites work.

[b]What I want to do[/b]
Now here is where it gets a bit strange. I don’t want to forward port 80 to this server. What I want to do is forward port 80 to another server and use proxypass to serve the web sites from the centos server. I have the proxypass server working. What I can’t do is get it to access the virtual hosts on the centos server.

[b]For example[/b]
Domaine1.com is proxypassed to http://192.168.1.98/ (ip on the centos server)
This will bring up my default web page.
Domaine2.com will then have to be proxypassed to its Document Root on the centos server.
Domaine2.com is proxypassed to http://192.168.1.98/home/alliehowe/public_html
But this doesn’t work.

[b]The Problem[/b]
How do I get apache on centos 4.1 to serve web pages by host name and by Document Root location?

ddrysdale
Posts: 42
Joined: 2005/05/14 00:49:20
Location: New Brunswick Canada
Contact:

Re: Apache sever web pages by Document Root?

Post by ddrysdale » 2005/09/19 23:09:16

Solved it. Didn't have a default virtual host.

Post Reply

Return to “CentOS 4 - Webhosting Support”