Page 1 of 1

How to change the php file location to other place?

Posted: Sat Apr 22, 2006 2:33 am
by hanxiao
I use MySQl 5.0, PHP 5.12, Apache 2.055, Dreamweaver MX 2004, Windows XP+SP2 and use localhost to programme PHP.


I put all the php files under apache installnation directory "D:\Apache Group\Apache2\htdocs", and the project folder is Learn, so all the files are under "D:\Apache Group\Apache2\htdocs\Learn", and use Dreamweaver MX 2004 to set up the Local Server, Remote Server and Testing Server. But for Testing Server, I don't know what should I put under URL prefix? Because currently it is under "http://localhost:8080/Learn/Testing/"

Just wonder how do I change the php.ini or httpd.conf to let me change the php file location to other places?

I heard from my friend, something like VirtualHost is the place I need to modify.

Thank you.

Posted: Sat Apr 22, 2006 5:24 am
by timvw
And what was unclear in the documentation for the Virtual Hosts? Btw, have you searched this forum since i've posted that section of my httpd.conf quite some times...

Btw, what you really need to read is the documentation for DocumentRoot.

Posted: Sat Apr 22, 2006 6:18 am
by hanxiao
I am new for PHP, Apache, not expert like you. I need direction.

I haven't searched this forum yet as I don't know there is such a tutorial post.

And I didn't see the documentation for the config file.

Thanks anyway.

Posted: Sat Apr 22, 2006 6:30 am
by timvw
Well, this is probably the best entry point for reading up on Configuration Files.

Posted: Sat Apr 22, 2006 8:32 am
by hanxiao
Yeah, thanks. I think I made it. I can uncomment and modify the VirtualHost section at the end of httpd.conf file, and also the NameVirtualHost to be the port I want to use for Apache.

So everything works. I can show the php page from the default directory and also other directories which are not under the Apache folder.

Thank you.