This is a discussion on Problem with Virtual Hosts for Windows on Apache 2 within the Apache Web Server forums, part of the Web Server and Related Forums category; I cannot get the virutal hosts to work with Apache2 on my windows server. This is the configuration I have. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I cannot get the virutal hosts to work with Apache2 on my windows server.
This is the configuration I have. Does anyone have experience configuring a Win2K machine? NameVirtualHost 219.250.125.145 <VirtualHost 219.250.125.145> ServerAdmin webmaster@domain1.org ServerName www.domain1.org DocumentRoot /websites/domain1 </VirtualHost> <VirtualHost 219.250.125.145> ServerAdmin webmaster@domain2.com ServerName www.domain2.com DocumentRoot /websites/domain2 </VirtualHost> <VirtualHost 219.250.125.145> ServerAdmin webmaster@domain3.com ServerName www.domain3.com DocumentRoot /websites/domain3 </VirtualHost> |
|
|||
|
Your problem is not in that block of text, that is all fine.
You might add the port number to those Ip addresses after a colon but it shouldn't be strictly necessary while you are only using one port. You can also add prot 80 to the NameVirtualHost directive. Then make sure you have a: Port 80 and Listen 80 directive. Andoni. PS: Write back if still having trouble (with more of httpd.conf) "Jak" <greg.martin1@comcast.net> wrote in message news:c4__a.147865$Ho3.18011@sccrnsc03... > I cannot get the virutal hosts to work with Apache2 on my windows server. > This is the configuration I have. Does anyone have experience configuring a > Win2K machine? > > NameVirtualHost 219.250.125.145 > > <VirtualHost 219.250.125.145:80> > ServerAdmin webmaster@domain1.org > ServerName www.domain1.org > DocumentRoot /websites/domain1 > </VirtualHost> > > <VirtualHost 219.250.125.145> > ServerAdmin webmaster@domain2.com > ServerName www.domain2.com > DocumentRoot /websites/domain2 > </VirtualHost> > > <VirtualHost 219.250.125.145> > ServerAdmin webmaster@domain3.com > ServerName www.domain3.com > DocumentRoot /websites/domain3 > </VirtualHost> > > |
|
|||
|
I tried the config you suggested but to no avail. I created a Port 80 but
Apache would not start. The port 80 and port 8080 are listed on the end of the IP address of my Servername directive. Apache is working fine for 1 website but it will not work for Virtual Hosts. "Andoni" <andoni@REMOVE.indigo.ie> wrote in message news:bhiph1$7o8$1@kermit.esat.net... > Your problem is not in that block of text, that is all fine. > > You might add the port number to those Ip addresses after a colon but it > shouldn't be strictly necessary while you are only using one port. You can > also add prot 80 to the NameVirtualHost directive. > > Then make sure you have a: > > Port 80 > > and > > Listen 80 > > directive. > > Andoni. PS: Write back if still having trouble (with more of httpd.conf) > > "Jak" <greg.martin1@comcast.net> wrote in message > news:c4__a.147865$Ho3.18011@sccrnsc03... > > I cannot get the virutal hosts to work with Apache2 on my windows server. > > This is the configuration I have. Does anyone have experience configuring > a > > Win2K machine? > > > > NameVirtualHost 219.250.125.145 > > > > <VirtualHost 219.250.125.145:80> > > ServerAdmin webmaster@domain1.org > > ServerName www.domain1.org > > DocumentRoot /websites/domain1 > > </VirtualHost> > > > > <VirtualHost 219.250.125.145> > > ServerAdmin webmaster@domain2.com > > ServerName www.domain2.com > > DocumentRoot /websites/domain2 > > </VirtualHost> > > > > <VirtualHost 219.250.125.145> > > ServerAdmin webmaster@domain3.com > > ServerName www.domain3.com > > DocumentRoot /websites/domain3 > > </VirtualHost> > > > > > > |
|
|||
|
I'm having a similar probelm with a Linux verion
"Jak" <greg.martin1@comcast.net> wrote in message news:c4__a.147865$Ho3.18011@sccrnsc03... > I cannot get the virutal hosts to work with Apache2 on my windows server. > This is the configuration I have. Does anyone have experience configuring a > Win2K machine? > > NameVirtualHost 219.250.125.145 > > <VirtualHost 219.250.125.145> > ServerAdmin webmaster@domain1.org > ServerName www.domain1.org > DocumentRoot /websites/domain1 > </VirtualHost> > > <VirtualHost 219.250.125.145> > ServerAdmin webmaster@domain2.com > ServerName www.domain2.com > DocumentRoot /websites/domain2 > </VirtualHost> > > <VirtualHost 219.250.125.145> > ServerAdmin webmaster@domain3.com > ServerName www.domain3.com > DocumentRoot /websites/domain3 > </VirtualHost> > > |