Wednesday, June 17, 2009

Apache How to Create Virtual Directory Inside ?

Task : To create Virtual Directory like in IIS in apache.

Step 1 : Go to httpd.conf file located in location : install_directory/conf

Step 2 : At End of the file add the directory name and alias as follows :

Alias /ABCName/images "E:/SomeDirectory/Images"

Options Indexes FollowSymLinks
AllowOverride FileInfo
Order Allow,Deny
Allow from All


Note : By Default the Options are as below
Options FollowSymLinks (Wrong Way)
Options Indexes FollowSymLinks (Correct Way)

However if you forgot to add Indexes in it,it will give you Directory index Forbidden error.

Step 3 : Restart Apache Web server.

Step 4 : Test the URL http://whatevername/ABCName/images . The page should come up.

No comments:

Post a Comment