Tip: Create a virtual directory in apache

Need to create a virtual directory in apache? Want to separate your tasks over different drives?
Its simple, open your httpd.conf file and add a new entry as

---- copy code starts----


Alias /bhagyesh/ "h:/bhagyesh_dir/"

<directory>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</directory>


---copy code ends---
in the above snippet "bhagyesh" is the alias name and "h:" is the drive where the dir is located and bhagyesh_dir is the directory which needs to be made a virtual directory. Hope you find the tip useful.

Comments

  1. Well thanks a lot dude... it made my day better... all other stupid websites say virtual hosts when i search for virtual directory (like in IIS). If it was linux, i guess symlinks would ve worked... unfortunately i ve to use xp now and this was really very usefull. Million thanks. Keep sharing! It'll find its own use :)

    ReplyDelete

Post a Comment

Popular Posts