Re: ServerName directive in a VirtualHost container

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

 



boyle.

  hi, answers inline.

thx.

yashesh

On 11/22/06, Boyle Owen <Owen.Boyle@xxxxxxx> wrote:
> -----Original Message-----
> From: Yashesh Bhatia [mailto:yasheshb@xxxxxxxxx]
> Sent: Wednesday, November 22, 2006 2:20 PM
> To: users@xxxxxxxxxxxxxxxx
> Cc: Me
> Subject:  ServerName directive in a VirtualHost container
>
> 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 ?

I don't know. I don't understand your question. What are you trying to
do? What goes wrong?


boyle. i'm trying to configure apache's virtual host capabilities to
host 2 domains on my local
box. i've got 3 virtualhost containers - 2 for the 2 dummy sites
www.testsite1.com and www.testsite2.com. i also need to access my
local machine - bfc11.venuslabs.int
using the vhost section.

so in the file /opt/httpd/conf/extra/httpd-vhost.com i have entries
for the 3 vhost containers
NameVirtualHost 192.168.1.11:80
<VirtualHost 192.168.1.11:80>
 ServerName bfc11.venuslabs.int
...
</VirtualHost>

i have similar entries for www.testsite1.com and www.testsite2.com and
i can access the urls
http://www.testsite1.com and http://www.testsite2.com, however, when i
try to access
http://bfc1.venuslabs.int/ i get an error "Forbidden You don't have
permission to access / on this server"

now if i change the ServerName from bfc11.venuslabs.int to
www.bfc11.venuslabs.int
i can access the index.html on the documentroot (http://www.bfc11.venuslabs.int)

so my questions is why would i be getting a permission denied error
when i try to access it using bfc11.venuslabs.int ?

sorry if the earlier question was convulated. i hope this is more clearer now.

thx for your assistnance.

yashesh



Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.

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


This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

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



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