Jump to content

Creating Virtual Directory in Apache


shakim

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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.