Tuesday, November 14, 2006

Setup Alias for your directories on Apache

Its very easy to setup aliases on Apache running under *nix platforms. It took a whole day to figure out and setup aliases for directories on Apache under Windows.

1. open httpd.conf for editing in your favorite text editor. Please be sure, you edit the right file.
2. search for word "Alias" [without quotes]. After search you may find something like this
# Alias ... [ alias name ] [full path name]
3. Delete # from the line, if present, otherwise add your own Alias directive as below.

Alias /img "C:\Myimages\images"

where "/img" is the alias you want to have for directory "C:\Myimages\images"

4. Save the file
6. Restart apache [ refer http://httpd.apache.org/ for starting up your apache webserver, incase you don't know how to]

Thats it, folks !!