ServerName directive in a VirtualHost container

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

 



Hi,

  I have the following setup

Fedora Core 6
Apache 2.2.3


In my httpd.conf file i have the following
----------------------------------------------------------------------------------------------------------------------------
ServerRoot "/opt/httpd-2.2.3"
Listen 80
# ServerName - not used since i'm using Name based virtual hosts
# DocumentRoot -         -  ditto -
<Directory />
   Options FollowSymLinks
   AllowOverride None
   Order deny,allow
   Deny from all
</Directory>
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
----------------------------------------------------------------------------------------------------------------------------

and in the httpd-vhosts.conf i have

----------------------------------------------------------------------------------------------------------------------------
NameVirtualHost 192.168.1.11:80

<VirtualHost 192.168.1.11:80>
 ServerName bfc11.venuslabs.int
 DocumentRoot "/opt/httpd/htdocs"

 <Directory "/opt/httpd/htdocs">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from 192.168.1.
   #Allow from all

   <FilesMatch "^config\.inc\.php">
     Order allow,deny
     Deny from all
   </FilesMatch>
 </Directory>

</VirtualHost>
----------------------------------------------------------------------------------------------------------------------------
and in the /etc/hosts file i have the following
----------------------------------------------------------------------------------------------------------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1     bfc11.venuslabs.int     bfc11   localhost.localdomain   localhost
192.168.1.11 bfc11.venuslabs.int   bfc11
----------------------------------------------------------------------------------------------------------------------------

Now when i try to access the url http://bfc11.venuslabs.int/ it gives a message
Forbidden
You don't have permission to access / on this server

but if i change the http-vhosts.conf file to use
 ServerName www.bfc11.venuslabs.int
instead of
 ServerName bfc11.venuslabs.int

and change the /etc/hosts file to use
192.168.1.11 www.bfc11.venuslabs.int   bfc11
instead of
192.168.1.11 bfc11.venuslabs.int   bfc11

i'm able to access the url http://www.bfc11.venuslabs.int

what could i be doing wrong with the ServerName bfc11.venuslabs.int ?
any pointers ?

thanks a bunch.

yashesh bhatia.

---------------------------------------------------------------------
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