[ringzero] Re: (OT) Apache Named Virtual Hosting question

  • From: Scott Robbins <scottro@xxxxxxxxxx>
  • To: ringzero@xxxxxxxxxxxxx
  • Date: Fri, 2 Feb 2007 08:48:37 -0500

On Fri, Feb 02, 2007 at 07:16:23AM -0600, Robert C Wittig wrote:

> I have two websites, robertwittig.net and robertwittig.org. Both are
> registered on GoDaddy, and pointing to my in-house web server,
> supermicro.robertwittig.net (running Apache 1.3.29), and both have
> standard 'www' aliases in the A (or is it C) Record on GoDaddy.
> 
> 
> I saved the default httpd.conf file for back-up, and, following the info
> at: http://httpd.apache.org/docs/1.3/vhosts/name-based.html (plus a few
> other various tutorials, which all said the same thing)... I went ahead
> and made exactly two changes to the httpd.conf file, adding:
> 
> ------------------------------------
> NameVirtualHost 192.168.1.10:80
> 
> ------------------------------------
> 
> ...and these...
> 
> ------------------------------------
> <VirtualHost 192.168.1.10:80>
>      DocumentRoot /www/htdocs
>      ServerName www.robertwittig.net
>      </VirtualHost>
> 
> <VirtualHost 192.168.1.10:80>

>      DocumentRoot /www/dotorg
>      ServerName www.robertwittig.org
>      </VirtualHost>
> --------------------------------------
> 

In my case (though this is apache 2.2) I found that I had to add some
Directory stuff in there. Although, last time I looked Apache docs
recommended doing it this way--actually, no, they simply recommended to
not do it the other way--they hadn't put this in their examples of
virtual hosts, but...

However, this was, IIRC, a different issue--I think I was getting
permission denied rather than not found.  Still, it might be of some
indirect use)

<VirtualHost 192.168.1.10:80
        DocumentRoot /www/htdocs
        ServerName www.robertwittig.net

<Directory /www/htdocs>
Order allow,deny
allow from all
        Options Indexes FollowSymLinks
</Directory>
        your other server stuff
</VirtualHost>

In other words, put your directory stuff inside the VirtualHost
container. 

Again, IIRC, my issue was a different one, but perhaps this gives some
indication? 

Hopefully yours,


-- 

Scott

GPG KeyID EB3467D6
( 1B848 077D 66F6 9DB0 FDC2  A409 FA54 D575 EB34 67D6)
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Anya: For a thousand years I wielded the powers of the
Wish. I brought ruin to the heads of unfaithful men. I brought forth
destruction and chaos for the pleasure of the lower beings. I was
feared and worshipped across the mortal globe. And now I'm stuck at
Sunnydale High. Mortal. Child. And I'm flunking Math.
-- 
You are receiving this message as part of your subscription to the
"ringzero" mailing list at freelists.org. To unsubscribe, send an e-mail
to ringzero-request@xxxxxxxxxxxxx?subject=unsubscribe

Other related posts: