Configuring Apache for more than 1 websites

This is a discussion on Configuring Apache for more than 1 websites within the Windows Web Servers forums, part of the Web Server and Related Forums category; Hi, I have a webserver with Apache and I'd like to host more than 1 websites on my server. ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-04-2003
Astavar
 
Posts: n/a
Default Configuring Apache for more than 1 websites

Hi,

I have a webserver with Apache and I'd like to host more than 1
websites on my server. My OS is Windows XP SP1. I have a static ip.

One site is working and can be reached through the outside world. How
do I have to configure Apache to host 2 or more sites?
Do I have to use Virtual Host and is that possible with 1 ip?

Tnx

Astavar
  #2 (permalink)  
Old 12-04-2003
Bert Brunekreeft
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites

Astavar wrote:
> Hi,
>
> I have a webserver with Apache and I'd like to host more than 1
> websites on my server. My OS is Windows XP SP1. I have a static ip.
>
> One site is working and can be reached through the outside world. How
> do I have to configure Apache to host 2 or more sites?
> Do I have to use Virtual Host and is that possible with 1 ip?
>
> Tnx
>
> Astavar



this is possible by using Virtual Hosts (indeed).
See: http://httpd.apache.org/docs-2.0/vhosts/

Bert
  #3 (permalink)  
Old 12-05-2003
Astavar
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites

Bert Brunekreeft <BBrunekreeft@wanadoo.nl> wrote in message news:<3fcf3f35$0$209$e4fe514c@news.xs4all.nl>...
> Astavar wrote:
> > Hi,
> >
> > I have a webserver with Apache and I'd like to host more than 1
> > websites on my server. My OS is Windows XP SP1. I have a static ip.
> >
> > One site is working and can be reached through the outside world. How
> > do I have to configure Apache to host 2 or more sites?
> > Do I have to use Virtual Host and is that possible with 1 ip?
> >
> > Tnx
> >
> > Astavar

>
>
> this is possible by using Virtual Hosts (indeed).
> See: http://httpd.apache.org/docs-2.0/vhosts/
>


Oke, I configured a virtual host and I can reach the server. But when
I try to open the website, it seems that apache only sees the one of
the first site and not the second. Whatever I try to change the
documentroot, it doesn't seem to work.
Can I get some help in this?
Tnx.
  #4 (permalink)  
Old 12-05-2003
Astavar
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites

Bert Brunekreeft <BBrunekreeft@wanadoo.nl> wrote in message news:<3fcf3f35$0$209$e4fe514c@news.xs4all.nl>...
> Astavar wrote:
> > Hi,
> >
> > I have a webserver with Apache and I'd like to host more than 1
> > websites on my server. My OS is Windows XP SP1. I have a static ip.
> >
> > One site is working and can be reached through the outside world. How
> > do I have to configure Apache to host 2 or more sites?
> > Do I have to use Virtual Host and is that possible with 1 ip?
> >
> > Tnx
> >
> > Astavar

>
>
> this is possible by using Virtual Hosts (indeed).
> See: http://httpd.apache.org/docs-2.0/vhosts/
>
> Bert




Oke that's clear. Now the next question. I made a virtual host and 2
test pages.
When I ask for my own site it is shown correctly. If I ask for the
second site it is directed to my site. So I can't see the 2nd test
page.
My documentroot is not changed. How can I show the 2nd testpage?
What do I need to change in the file or document root to get it on
line?

Tnx.
  #5 (permalink)  
Old 12-05-2003
Phil Frisbie, Jr.
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites


Astavar wrote:

> Bert Brunekreeft <BBrunekreeft@wanadoo.nl> wrote in message news:<3fcf3f35$0$209$e4fe514c@news.xs4all.nl>...
>
> Oke that's clear. Now the next question. I made a virtual host and 2
> test pages.
> When I ask for my own site it is shown correctly. If I ask for the
> second site it is directed to my site. So I can't see the 2nd test
> page.
> My documentroot is not changed. How can I show the 2nd testpage?
> What do I need to change in the file or document root to get it on
> line?


Did you set up DNS for the second site?

> Tnx.


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

  #6 (permalink)  
Old 12-06-2003
Astavar
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites

"Phil Frisbie, Jr." <phil@hawksoft.com> wrote in message news:<vo7Ab.1012$XF6.23278@typhoon.sonic.net>...
> Astavar wrote:
>
> > Bert Brunekreeft <BBrunekreeft@wanadoo.nl> wrote in message news:<3fcf3f35$0$209$e4fe514c@news.xs4all.nl>...
> >
> > Oke that's clear. Now the next question. I made a virtual host and 2
> > test pages.
> > When I ask for my own site it is shown correctly. If I ask for the
> > second site it is directed to my site. So I can't see the 2nd test
> > page.
> > My documentroot is not changed. How can I show the 2nd testpage?
> > What do I need to change in the file or document root to get it on
> > line?

>
> Did you set up DNS for the second site?
>
> > Tnx.


I'm sorry, but you lost me in here. :) I'm running a little network in
which the dns is obtained automatically. How do I have to change that?
Also I only have 1 ip address and the virtual host is configured as a
namebased host.
So please, can you help me in this?
  #7 (permalink)  
Old 12-07-2003
Johannes Lichtenberger
 
Posts: n/a
Default Re: Configuring Apache for more than 1 websites

astavar@zonnet.nl (Astavar) wrote:

> Oke that's clear. Now the next question. I made a virtual host and 2
> test pages.
> When I ask for my own site it is shown correctly. If I ask for the
> second site it is directed to my site. So I can't see the 2nd test
> page.
> My documentroot is not changed. How can I show the 2nd testpage?


What does it mean?

<VirtualHost *>
...
DocumentRoot /www/first
</VirtualHost>

<VirtualHost *>
...
DocumentRoot /www/second
</VirtualHost>

You must have another DocumentRoot.

> What do I need to change in the file or document root to get it on
> line?


There have to be two DocumentRoots. One for the first VirtualHost and
one for the second.

If it doesn't work: Your UA must send the Host-Header, e.g.

Host: www.example.com:80

If it doesn't send the Host-Header the Webserver doesn't know which
Virtual Host to take. This should only occur with older Browsers which
take HTTP/1.0 (if you use HTTP/1.1 you have to specify a Host-Header).
--
Johannes Lichtenberger · http://www.nabooisland.com
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:10 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0