You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Kogut <jm...@gmail.com> on 2005/10/16 00:02:10 UTC

[users@httpd] Help with winxp virtual ip based hosting

I have wanted to set up a small Internet-like environment on my local LAN
for testing purposes. The only problem is that none of my servers are happy
with name-based virtual hosting. So, I figured out how to add an IP address
in

control panel>networkconnections>[lanconnection properties]>tcpip
properties>advanced

My dns server (sans) is configured to direct all trafic to one of the
correct IP for the server, but I am unsure as exactly how to set up the
htttpd.conf file for my server. Help please. (Also, am I going in the right
direction?)

--
|| jmkogut ||
email: jmkogut@gmail.com
|| Networking: Where all your problems are category 5. ||

Re: [users@httpd] Help with winxp virtual ip based hosting

Posted by Joshua Kogut <jm...@gmail.com>.
Yah, but my dns server doen't forward names :(


On 10/16/05, James W. Anderson <jw...@bellsouth.net> wrote:
>
>  If you have your own DNS server, then name-based virtual hosting should
> be very easy. You just need to setup your DNS names to "point" to the same
> IP address (where Apache is running), then setup your httpd.conf file like
> this:
>
>  # required to allow name-based virtual hosting; can replace * with your
> Apache host's IP
>
> NameVirtualHost *
>
>  # first virtual host (siteone)
>
> <VirtualHost *>
>
> ServerName www.siteone.com <http://www.siteone.com>
>
> DocumentRoot "c:/websites/siteone/htdocs"
>
> TransferLog "c:/websites/siteone/logs/access.log"
>
> ErrorLog "c:/websites/siteone/logs/error.log"
>
> </VirtualHost>
>
>  # redirect, incase client leaves off "www."
>
> <VirtualHost *>
>
> ServerName siteone.com <http://siteone.com>
>
> Redirect / http://www.siteone.com/
>
> </VirtualHost>
>
>  # second virtual host (sitetwo)
>
> <VirtualHost *>
>
> ServerName www.sitetwo.com <http://www.sitetwo.com>
>
> DocumentRoot "c:/websites/sitetwo/htdocs"
>
> TransferLog "c:/websites/sitetwo/logs/access.log"
>
> ErrorLog "c:/websites/sitetwo/logs/error.log"
>
> </VirtualHost>
>
>  # redirect, incase client leaves off "www."
>
> <VirtualHost *>
>
> ServerName sitetwo.com <http://sitetwo.com>
>
> Redirect / http://www.sitetwo.com/
>
> </VirtualHost>
>
>  I've been using this type of configuration for a couple years now to host
> multiple web sites on one Apache server, and it hasn't failed me yet. I
> hope this helps.
>
>  James
>
>   ------------------------------
>
> *From:* Joshua Kogut [mailto:jmkogut@gmail.com]
> *Sent:* Saturday, October 15, 2005 6:02 PM
> *To:* users@httpd.apache.org
> *Subject:* [users@httpd] Help with winxp virtual ip based hosting
>
>  I have wanted to set up a small Internet-like environment on my local LAN
> for testing purposes. The only problem is that none of my servers are happy
> with name-based virtual hosting. So, I figured out how to add an IP address
> in
>
> control panel>networkconnections>[lanconnection properties]>tcpip
> properties>advanced
>
> My dns server (sans) is configured to direct all trafic to one of the
> correct IP for the server, but I am unsure as exactly how to set up the
> htttpd.conf file for my server. Help please. (Also, am I going in the
> right direction?)
>
> --
> || jmkogut ||
> email: jmkogut@gmail.com
> || Networking: Where all your problems are category 5. ||
>



--
|| jmkogut ||
email: jmkogut@gmail.com
|| Networking: Where all your problems are category 5. ||

RE: [users@httpd] Help with winxp virtual ip based hosting

Posted by "James W. Anderson" <jw...@bellsouth.net>.
If you have your own DNS server, then name-based virtual hosting should be
very easy.  You just need to setup your DNS names to "point" to the same IP
address (where Apache is running), then setup your httpd.conf file like
this: 

 

# required to allow name-based virtual hosting; can replace * with your
Apache host's IP

NameVirtualHost *

 

# first virtual host (siteone)

<VirtualHost *>

      ServerName www.siteone.com

      DocumentRoot "c:/websites/siteone/htdocs"

      TransferLog "c:/websites/siteone/logs/access.log"

      ErrorLog "c:/websites/siteone/logs/error.log"

</VirtualHost>

 

# redirect, incase client leaves off "www."

<VirtualHost *>

      ServerName siteone.com

      Redirect / http://www.siteone.com/

</VirtualHost>

 

# second virtual host (sitetwo)

<VirtualHost *>

      ServerName www.sitetwo.com

      DocumentRoot "c:/websites/sitetwo/htdocs"

      TransferLog "c:/websites/sitetwo/logs/access.log"

      ErrorLog "c:/websites/sitetwo/logs/error.log"

</VirtualHost>

 

# redirect, incase client leaves off "www."

<VirtualHost *>

      ServerName sitetwo.com

      Redirect / http://www.sitetwo.com/

</VirtualHost>

 

I've been using this type of configuration for a couple years now to host
multiple web sites on one Apache server, and it hasn't failed me yet.  I
hope this helps.

 

James

 

  _____  

From: Joshua Kogut [mailto:jmkogut@gmail.com] 
Sent: Saturday, October 15, 2005 6:02 PM
To: users@httpd.apache.org
Subject: [users@httpd] Help with winxp virtual ip based hosting

 

I have wanted to set up a small Internet-like environment on my local LAN
for testing purposes. The only problem is that none of my servers are happy
with name-based virtual hosting. So, I figured out how to add an IP address
in  

control panel>networkconnections>[lanconnection properties]>tcpip
properties>advanced

My dns server (sans) is configured to direct all trafic to one of the
correct IP for the server, but I am unsure as exactly how to set up the
htttpd.conf file for my server. Help please. (Also, am I going in the right
direction?)

-- 
||  jmkogut  ||
email: jmkogut@gmail.com
|| Networking: Where all your problems are category 5. ||