RE: [PHP] Virtual Host problem
| From: | Chris Gregors | Date: | Thu, 23 Sep 2004 17:46:50 +0000 |
| Subject: | RE: [PHP] Virtual Host problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197722@lists.php.net to get a copy of this message | ||
scan your apache httpd.conf file for the following:
User apache
Group apache
Note the userid and groupid (I use apache).
Verify that the index.php files are readable by the apache "User" and
"Group".
Correct the file ownership and/or change the User/Group that apache runs
as.
-----Original Message-----
From: Jason Davidson [mailto:jdavidson@zworg.com]
Sent: Thursday, September 23, 2004 11:42 AM
To: a.k.a kioto; php-general@lists.php.net
Subject: Re: [PHP] Virtual Host problem
your problem, as correctly outputted, is permission based, and as far as
i can tell, has nothing to do with PHP..
Jason
"a.k.a kioto" <webmaster@sottilelinearossa.it> wrote:
>
> Hi all i've try to configure Apache with Virtual Host in the main
> configuration file of Apache i have modify like this:
>
> #NameVirtualHost *:80
> NameVirtualHost *
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a VirtualHost container.
> # The first VirtualHost section is used for requests without a known
> # server name.
> #
> <VirtualHost *:80>
> ServerAdmin kioto@mordoch.com
> DocumentRoot /usr/local/apache/users/default
> ServerName mordoch
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerAdmin kioto@mordoch.com
> DocumentRoot /usr/local/apache/users/mysite
> ServerName mysite
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerAdmin kioto@mordoch.com
> DocumentRoot /usr/local/apache/users/brothersite
> ServerName brother
> </VirtualHost>
>
> I have insert a file index.php in all main folder of virtaul host:
> /usr/local/apache/users/default/index.php
> /usr/local/apache/users/mysite/index.php
> /usr/local/apache/users/brothersite/index.php
> I have modified the file hosts in etc/hosts.
>
> 39.244.88.126 mordoch
> 127.0.0.1 mordoch
> 127.0.0.1 localhost
> 127.0.0.1 mysite
> 127.0.0.1 brother
>
> When i try to view with my browser i type on my addressbar
> http://localhost i receive a message error like this:
>
> Warning: Unknown(/usr/local/apache_1.3.31/users/default/index.php):
> failed to open stream: Permission denied in Unknown on line 0
>
> Warning: (null)(): Failed opening
> '/usr/local/apache_1.3.31/users/default/index.php' for inclusion
> (include_path='.:/usr/local/php/lib/php') in Unknown on line 0
>
> I receive this error for all virtual host that i have create.
> The chmod of all folder is set to 777.
> What are the reason ?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Attachment: [application/x-pkcs7-signature] smime.p7s
Attachment: [application/x-pkcs7-signature] smime.p7s