Re: [users@httpd] DocumentRoot for Name-based Virtual Host

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

 



At 01:23 PM 9/14/05 -0400, you wrote:
> I put the following in httpd.conf:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>         DocumentRoot /home/amos/local-web/php
>         ServerName php-web
> </VirtualHost>
>
>
> then I added the following to the hosts file:
>
> 127.0.0.1       php-web
>
>
> I created a file, welcome.php and put it in /home/amos/local-web/php but
> when I put http://php-web/welcome.php into the browser I get an Access
> forbidden! Error 403.

And what does the error_log say?


It says, client denied by server configuration: /home/amos/local-web/php/welcome.php

First, it looks like you haven't read the big box labled "Main host
goes away" on this page:
http://httpd.apache.org/docs/2.0/vhosts/name-based.html

Okay, thanks. I put the following block in and the localhost and 127.0.0.1 addresses seem to be working correctly again.

<VirtualHost *:80>
        ServerName localhost:80
        DocumentRoot /var/www/html
</VirtualHost>

Does the localhost seem like the correct server name to specify since I'm just using it for a localhost web server and the /conf/hosts file has an entry 127.0.0.1 localhost?



Second, you have some permissions problem.  If you are using Fedora,
then you can't do what you want without turning off or modifying the
SELinux configuration.

I'm using Mandriva 2006-RC1 beta. Root has 700 permissions, everything else in line has 755, and the file has 644.

Thanks again,
Matt




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