Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make virtual directory in apachee?

Status
Not open for further replies.

Jason231

MIS
Apr 15, 2006
43
0
0
NL
Hi all installed apachee in my c drive under c:\webserver\apache\ and my public directory where i put my html files are located at c:\webserver\public\

I got a huge list of files outside the webserver directory and it is located at c:\folder\filename\myfiles . I wonder how i can make my website point to that folder and be able to use this folders containt without having to move them inside my public apache folder.

Is there a way to make it like http:\localhost\music\ and be able to view and read c:\folder\filename\myfiles without having to move the folder inside webserver. I be happy if some one tell me how to achive this task.thanks
 
Adding the following to your config...

Code:
alias /myfiles "c:\folder\filename\myfiles"
<Directory "c:\folder\filename\myfiles">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

... will allow you to connect using the URL
 
Many thanks irudebwoy . could u tell me what file should i look for inside my apache webserver and where should i place the above code ? Furthermorem, which part of code deals with permessions and does this code allow me to view the content of the virtual forlder ?Thanks
 
You would edit httpd.conf and add the alias directive and directory container as mentioned above. The Alias directive takes a fake folder name and the path to the real folder. Putting the "/" in front of the fake name says to pretend it is in my DocumentRoot (where my web pages are). The directory container tells apache who can do what in that directory. Don't forget to restart the server any time you edit this file.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top