This is a discussion on Apache 2 IP based virtual hosting within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello, I was hoping I could find out a little information about how ip based virtual hosting works with apache. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I was hoping I could find out a little information about how ip based virtual hosting works with apache. I have a static IP address assigned to my DSL modem and an apache webserver running on linux behind a router on a private LAN. I'm trying to host two domains on one server running apache 2.0. I have a red-hat linux system and I've set up two IP aliases on the box for the ethernet card. I have also set up the virutal host configuration for the two domains in httpd.conf according to the example on ip based virtual hosting in the apache documentation. I can only serve one domain though and it's the pages defined by the document root and not the pages defined by the virtual host section so I don't think virtual hosting is working at all. Is this even possible given my configuration? The IP's I use for the virtual hosts are aliases eth0:1 and eth0:2 but I don't see how this works if the requests for all the domains are being sent to the static IP? greatful thanks, mike |
|
|||
|
Michael Starbuck <spam@none.com> wrote:
> Hello, > I was hoping I could find out a little information about how ip based > virtual hosting works with apache. I have a static IP address assigned > to my DSL modem and an apache webserver running on linux behind a router > on a private LAN. I'm trying to host two domains on one server running > apache 2.0. I have a red-hat linux system and I've set up two IP > aliases on the box for the ethernet card. I have also set up the > virutal host configuration for the two domains in httpd.conf according > to the example on ip based virtual hosting in the apache documentation. > I can only serve one domain though and it's the pages defined by the > document root and not the pages defined by the virtual host section so I > don't think virtual hosting is working at all. Is this even possible > given my configuration? The IP's I use for the virtual hosts are > aliases eth0:1 and eth0:2 but I don't see how this works if the requests > for all the domains are being sent to the static IP? > > greatful thanks, > mike > You can use ip based virtual hosting with only one public ip address. You will have to switch to name based virtual hosting. There should be an example of name based virtual hosting in the example config file. Jeff |