Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2004, 03:08 PM
Authorized User
 
Join Date: May 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default simple apache and php question

i have my apaceh document root configured for DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

but i want to keep all of my php files in a folder under my D:/ drive
d:/php

how do i need to edit the http.conf script to allow me to do this.

thanks

 
Old July 19th, 2004, 09:06 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You can change this in one of two places.

The first is globally.
Code:
#
# 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 "C:/Apache Group/Apache2/htdocs"

DocumentRoot "D:/php"
Or you can set up a virtual host configuration and map the directory to a specific domain or IP address.

Code:
<VirtualHost 127.0.0.1:*>
    ServerName localhost
    ServerAlias domain.tld *.domain.tld
    DocumentRoot D:/www
</VirtualHost>
HTH!

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Php/Apache blackout PHP How-To 1 August 22nd, 2006 08:16 AM
PHP 5.0 and Apache SeniorNSU BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 January 4th, 2006 10:26 PM
which is best :php with iis or php with apache? fromheavenz Beginning PHP 4 September 7th, 2005 01:47 AM
Beginning PHP, Apache ... Thank You ! dotty Wrox Book Feedback 0 January 16th, 2005 07:53 AM
Need help with Apache and PHP yaluyahee BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 19 August 31st, 2004 02:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.