VirtualHost & UseCanonicalName Off

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On my Fedora 12 laptop, I'm trying to set up a WEB site development
environment to mimic my real web server that contains several virtual
hosts. On my laptop I want the Apache server to respond to Firefox's
requests to http://localhost/somedomain.com and haul up what my local
development site looks like.

I've set up the following in the httpd.conf:

...
...
UseCanonicalName Off
...
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin xxxx@xxxxxxx
    DocumentRoot /var/www/html/roatanbakery.com
    ServerName roatanbakery.com:80
    ErrorLog /var/log/httpd/roatanbakery.com-error_log
    CustomLog /var/log/httpd/roatanbakery.com-access_log common
    <Directory /var/www/html/roatanbakery.com>
       AllowOverride Options
       XBitHack On
       Options Indexes MultiViews +Includes
       Order allow,deny
       allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin xxxx@xxxxxxx
    DocumentRoot /var/www/html/ycc.com
    ServerName ycc.com:80
    ErrorLog /var/log/httpd/ycc.com-error_log
    CustomLog /var/log/httpd/ycc.com-access_log common
    <Directory /var/www/html/ycc.com>
       AllowOverride Options
       XBitHack On
       Options Indexes MultiViews +Includes
       Order allow,deny
       allow from all
    </Directory>
</VirtualHost>


httpd -S reports:
root@billlaptop # httpd -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443          billlaptop.private.ycc
(/etc/httpd/conf.d/ssl.conf:75)
*:80                   is a NameVirtualHost
         default server roatanbakery.com (/etc/httpd/conf/httpd.conf:1001)
         port 80 namevhost roatanbakery.com
(/etc/httpd/conf/httpd.conf:1001)
         port 80 namevhost ycc.com (/etc/httpd/conf/httpd.conf:1027)
Syntax OK


Via Firefox, if I key in
	http://localhost
I get the roatanbakery.com web site on my box. If, however, I key in
	http://localhost/roatanbakery.com
I get:
Not Found

The requested URL /roatanbakery.com/ was not found on this server.
Apache/2.2.14 (Fedora) Server at billlaptop Port 80
Same for http://localhost/ycc.com

I'm apparently getting the default virtual host by using a non specific
http request to the localhost. As soon as I try to be specific it won't
work, even though the httpd -S says it recognizes the 2 virtual domains,
and the default and the specific request point at the same virtual area.

My reading of the docs for UseCanonicalName Off says that this should
work. Trying to wget these virtuals also doesn't work, so I know its
something to do with the Apache configuration, but I don't see what's wrong.

Any help would be appreciated.
Thank You

--
Bill Gradwohl

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux