14 June 2009

How to create virtual directory in Apache using Linux [Ubuntu]

Assuming that you have already installed apache2, you have to follow the steps below.

1. Open the /etc/apache2/conf.d/security file for edit.

sudo gedit /etc/apache2/conf.d/security

2. Edit the security file. Say we want to create virtual directory named php with the folder /media/Documents/Works/PHP. Then we have to add the following lines in the security file

Alias /php /media/Documents/Works/PHP

<Directory /media/Documents/Works/PHP/>

DirectoryIndex index.php

AllowOverride None

Order Allow,Deny

allow from all

</Directory>

3. Restart apache

sudo /etc/init.d/apache2 reload


Note: In Linux Apache, web directory is case sensitive (which is not the case in windows IIS)

0 Comments:

 

© 2007 t!ps n tr!cks: How to create virtual directory in Apache using Linux [Ubuntu]



Template unik dari rohman


---[[ Skip to top ]]---