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. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
"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? |
|
|||
|
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 | |
|
|