httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "H. Carter Harris" <carter-li...@technettn.net>
Subject RE: [users@httpd] Virtual Hosts ?
Date Thu, 02 Jan 2003 01:16:01 GMT
Brad:  I didn't cut and paste I typed and it is correct in the conf file.
Thanks for catching me though (smile).

Michael:  I am currently running an IIS server (nt4) and a DNS server
(win2k) that I would like to replace with the linux box.  So I'm learning
the linux world.  Abit not without some pain.

I am actually testing this over the internet.  I am using VPN to access all
three of these servers.  I can modify the httpd.conf file on the linux box
then stop and restart apache to pick up the changes.  I have a FQDN that is
not in production and I can modify the DNS server on win2k the same way.  I
am testing by pointing my local browser to the ip address of the router
(which I also configured).   103 is a static address on the server and the
router ... I'm not using DHCP to get it.

I can configure apache (as described) and get the default site on the linux
box.  If I point the default to the second document root I get the second
site instead of the default.  So it works okay for one site at at time ...
either one.

But I want them both to work.  www.domain2.com when requested and the
default when anything else is requested.  It ought to be simple.

I appreciate the reply and welcome any more suggestions.  I'm getting to the
server but I'm not serving up the right sites on demand.  Thanks again to
both of you.

-----Original Message-----
From: Michael Olds [mailto:MikeOlds@themozone.net]
Sent: Wednesday, January 01, 2003 6:18 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Virtual Hosts ?


> I have been following the list closely for the last few weeks trying to
> become knowledgeable enough to configure an apache 1.3.23 as
> distributed by
> Mandrake as a virtual host.
>
> I want a default site and a name based site so I have the following:
>
> NameVirtualHost 192.168.1.103
>
> <VirtualHost _default_>
> SeverName linuxserver.mydomain.net
> DocumentRoot /var/www/html
> </VirtualHost>
>
> <VirtualHost 192.168.1.103>
> ServerName www.domain2.com
> DocumentRoot /usr/www/site.first/htdocs
> </Virtual Host>
>
> 1. As written I get a 403 Forbidden error on both pages.
>
> 2. If I change the 192.168.1.103 in the second virtual host to *, requests
> go to my default for both sites.
>
> 3. Changing the 192.168.1.103 to * in both the NameVirtualHost
> directive and
> the second virtual host, returns a 403 Forbidden error when requesting
> www.domain2.com and the default when requesting anything else at
> 192.168.1.103.
>
> There are DocumentRoot directives outside the VirtualHost sections above.
> Removing them gave me the same results as 3.
>
I'm just a duffer meself, but on a day like today you might not do any
better.

How are you figuring you have IP# 192.168.1.103?

Try using the IP# in both VH containers (the first is always the default)

My gut feeling tells me you are on a LAN and are using DHCP. Are you just
taking the number the router usually gives you? You need to set up static IP
numbers on the LAN (fiddle with router and Network setups on each computer
or the header information needed to sort out whichiwhicha doesn't get
through.

Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message