Jump to content

Archived

This topic is now archived and is closed to further replies.

shakim

Creating Virtual Directory in Apache

Recommended Posts

In IIS you were able to install the web server in windows and then create virtual directories anywhere, including a external drive.  This way the location on the external drive (directory ) would act as a webserver location.  You were able to execute scripts.  I need this setup because I would like to work on web apps at home and at work and be able and be able to just plug in my external drive and it would be part of the web server. Is there a way to do that with apache 2.0?

Share this post


Link to post
Share on other sites
The "Apache" term for an IIS Virtual Directory is an alias. Using apache aliases is really simple.

Search for:

# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname

A few lines under, there might be an alias already set up. For example:

Alias /icons/ "D:/My Documents/My Webs/Apache/icons/"
    <directory "D:/My Documents/My Webs/Apache/icons" >
        Options Indexes FollowSymlinks MultiViews Includes
        AllowOverride None
        Order allow,deny
        Allow from all
  </directory>

Add as many aliases as you need, listing the path to the folder on your hard drive, using the same format as previously listed. If you are utilizing Server Side Includes (SSI) you must make sure the text “Includes” is listed or SSI will not render properly when testing in Apache.

Hope this helps.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.