You are here: Re: Virtual servers and $_SERVER[DOCUMENT_ROOT] « PHP Programming Language « IT news, forums, messages
Re: Virtual servers and $_SERVER[DOCUMENT_ROOT]

Posted by Steve on 06/24/06 00:25

On Fri, 23 Jun 2006 13:51:18 -0400, George Zervakos wrote:

> Hello,
>
> I'm new to php and was wondering if someone could help me out with the best
> way to accomplish this.
>
> I have Solaris 9/Apache 1.3.31/PHP 5.1.4 that I compiled from source code
> and installed.
>
> I have multiple virtual web servers configured in httpd.conf and php scripts
> run only if they are placed in my first VirtualHost DocumentRoot directory
> as defined in httpd.conf:
>
> <VirtualHost X.X.X.X:80>
> DocumentRoot /usr/local/apache/sites/webdocdir
> </VirtualHost>
>
> I would like to get php scripts to run in one of my other virtual servers
> defined in httpd.conf.
>
> Right now, my $_SERVER[DOCUMENT_ROOT] gets defined (I think) from httpd.conf
> such that it points to /usr/local/apache/sites/webdocdir. This I can see
> from the results of a phpinfo().
>
> Is there some way of configuring Apache and/or php so that I am not forced
> to put php scripts in /usr/local/apache/sites/webdocdir?
>
> thanks for any help,
>
> George

The ScriptAlias directive will do this for you.;

Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация