Page 1 of 1

Having folders outside of xampp directory?

PostPosted: 10. March 2008 03:07
by hobano
I have my site "C:\xampp\htdocs\" folder.

I have a directory on my "D:" drive i want to have listed.

Do I have to put my contents from "D:" into my htdocs folder, or is there another way?

Thanks

sorry, just realized this was in the wrong forum :!:

PostPosted: 10. March 2008 12:41
by Nobbie
No. You can use "Alias" Directive to access the directory in D:

Edit httpd.conf and insert the Alias:

Code: Select all
Alias /anyname D:/anyfolder/somewhere


You may replace "anyname" and so on by your own values. After reboot of Apache you can access the files in D:/anyfolder/somewhere by typing http://localhost/anyname in your browser.

Usually Apache may not access all folders on your PC, therefore it might be necessary to grant access to the new folder via <directory ...>:

Code: Select all
<Directory D:/anyfolder/somewhere>
Option Indexes
Order allow,deny
Allow from all
</Directory>


Insert these lines directly under the Alias for better readability. If you leave them out and Apache does not have sufficient rights to access D:/anyfolder/somewhere, you will get an Error 403.

PostPosted: 17. March 2008 09:02
by tjrush
May I ask, where within the httpd.conf file do you put the Alias directive?

PostPosted: 17. March 2008 09:14
by Milligan

PostPosted: 17. March 2008 16:36
by sari42
your xampp has already some alias folders defined in

C:\xampp\apache\conf\extra\httpd-xampp.conf

(for example phpmyadmin...)

PostPosted: 18. March 2008 06:23
by tjrush
Thank you. I have it working.