Re: [PHP] Virtual Host problem
please send it to Apache mailling list. --- "a.k.a kioto" <[EMAIL PROTECTED]> 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. > # > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/default > ServerName mordoch > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/mysite > ServerName mysite > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/brothersite > ServerName brother > > > 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 > > = -DIGITAL SIGNATURE--- ///Mohsen Pahlevanzadeh Network administrator & programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Virtual Host problem
> Someone correct me if I am wrong, but haven't you just confused the > hell out of Apache? You have just declared three virtual hosts, all > listening on port 80, but apache has no way to identify them based on > the incoming packets. You need to add a "ServerName" directive to > each virtual host configuration in order to get the hosts working > correctly. Ack! Scratch that... didn't read enough. :-o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Virtual Host problem
a.k.a kioto wrote: 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 ? Since you don't have a virtual host named 'localhost', Apache is probably using the first docroot it comes too. Towards the top of your Apache conf file, you should see a section like this (in the 'Main Server Configuration' area) # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/path/to/doc/root" Change that to whatever you want your default document root to be (/usr/local/apache/users/default/), and restart Apache. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Virtual Host problem
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:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 11:42 AM To: a.k.a kioto; [EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 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. > # > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/default > ServerName mordoch > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/mysite > ServerName mysite > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/brothersite > ServerName brother > > > 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 smime.p7s Description: S/MIME cryptographic signature
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" <[EMAIL PROTECTED]> 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. > # > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/default > ServerName mordoch > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/mysite > ServerName mysite > > > > ServerAdmin [EMAIL PROTECTED] > DocumentRoot /usr/local/apache/users/brothersite > ServerName brother > > > 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
[PHP] Virtual Host problem
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. # ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/default ServerName mordoch ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/mysite ServerName mysite ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/apache/users/brothersite ServerName brother 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
Re: [PHP] virtual host problem
Re question 2: You can set this using the php_value command in apache. I think you need to have the SAPI version configured for this to work though. You might want to check that out. I have only done this on XP, haven't tried it on linux yet. ServerAdmin [EMAIL PROTECTED] DocumentRoot "D:\web\wilson\www" ServerName blah.blah.com ErrorLog "D:\web\blah\logs\error.log" CustomLog "D:\web\blah\logs\access.log" common php_value include_path "D:\web\blah\includes" So your www directory would exist within D:\web\blah\www, keeping your includes safe. In your php.ini you can leave your includes line blank. Hope it helps! Regards, Ian Newlands "1lt John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:003f01c1f76f$9df452f0$2f7e3393@TB447CCO3... > > To learn more, I put the phpinfo(); function in my document root, and > > lo and behold, I get this long a gnarly virtual path: > > /home/virtual/site26/fst/var/www/html/ > > as my document root. So I try: > > /home/virtual/site26/fst/var/www/rsrcs/ for my includes, and still > > can't get to it. > > You've probably got an ensim system, don't you? The host for falkware.com is > like that and it's a pain. Through ssh, the path to the file is > /var/www/html/etc..., but like you, we have to use the whole "hidden" path > /home/virtual/site26/fst/var/www/rsrcs/... That should work for you. What > kind of error are you getting when you use the entire path? > > > SECOND QUESTION: are there any virtual host gurus who can tell me how to > > get Apache/PHP to include files from outside of the document root on > > virtual hosted systems? > > You can use an absolute path, with /home/virtual ... or use a relative path > from the script you're in ../../includes/ etc.. > > ---John Holmes... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php