setting documentroot in apache

Posted by fusion on Server Fault See other posts from Server Fault or by fusion
Published on 2010-04-30T11:20:34Z Indexed on 2010/04/30 11:28 UTC
Read the original article Hit count: 563

i've set the documentroot in httpd.conf as:

DocumentRoot "C:\Users\user1\Documents\WebProjects"

if the files are located in WebProjects, they work; however if i create a sub folder [project] in WebProjects and access them via the browser, it doesn't load. for example, if i create a folder 'test' in WebProjects and a php file called test.php and call it: localhost/test/test.php . .this won't work and give the error of file not found on server.

but if i put all the files in WebProjects itself, ie. test.php in WebProjects, it will work [localhost/test.php]. this makes my WebProjects folder look very cluttered with different files of different projects strewn around. and it isn't practical either.

i'm new to using apache and hence would like to know how to set the document root such that i can access and load all the Projects/folders in WebProjects.

© Server Fault or respective owner

Related posts about apache

Related posts about apache-config