Re: PHP's doc_root

From: Date: Fri, 23 Mar 2001 03:18:00 +0000
Subject: Re: PHP's doc_root
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-6241@lists.php.net to get a copy of this message
Thanks for the help. I ended up using name-based vhosts instead, but I would not have figured it out without your help. Thanks again. Ignatius Teo wrote: > This is an Apache configuration issue. > > You can set up multiple IP-based Virtual Hosts with different document roots on a Windoze box. > > In your C:\WINDOWS\HOSTS file, set up some IP addresses: > > localhost 127.0.0.1 > myserver 127.0.0.2 > etc... > > In your Apache httpd.conf file: > > <VirtualHost 127.0.0.1> > DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/public" > ServerName localhost > </VirtualHost> > > <VirtualHost 127.0.0.2> > DocumentRoot "c:\php\scripts" > ServerName myserver > ServerAlias scripts > </VirtualHost> > > For more info, RTFM for Apache. > > Good luck. > > Ignatius > > > -----Original Message----- > > From: Rayon Pinnock [mailto:rayon@iname.com] > > Sent: Friday, 23 March 2001 11:12 > > To: php-windows@lists.php.net > > Subject: [PHP-WIN] PHP's doc_root > > > > > > I am running Apache 1.3.19 web server under Windows 2000 Professional > > with > > php4 configured as a module of Apache. > > > > Previously php4 was configured was used a cgi interpreter > > and in the php.ini file I had > > > > doc_root = "c:\php\scripts" > > > > and in the httpd.conf file I had > > > > DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/public" > > > > and it worked beautifully. i.e. I could type > > http://localhost/myscript.php > > in my browser and the web server would automatically check > > the directory > > > > specified by doc_root for the requested php script and go on > > from there. > > > > > > However under the current configuration the web server cannot find the > > scripts and the browser reports the dreaded error: HTTP 404 - File not > > found. > > > > What I did as a workaround was to place the php scripts > > somewhere under > > the web server's DocumentRoot and specify the path when making script > > requests. This works but I want to have my scripts organized > > like I did > > > > before - i.e. in a separate directory tree than that of the > > web server's > > > > root. Please advise. > > > > Rayon Pinnock > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > >

« previous php.windows (#6241) next »