Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a Windows server running Apache.

The Apache server is successfully configured to serve 6 sites using name-based virtual hosting.

I need to add a virtual directory to ONE of these sites, and have that directory's default document be a specific file from the site's directory structure (The site uses a CMS that generates fairly unpleasant static URLs, which is why we want to do this).

So, what I want is:

to serve content from

I can't work out how/where to add the statements to create the virtual directory.

Here's a chunk from the httpd-vhosts.conf file so you can see how we have configured what is working so far (IP addresses & URLs have been changed):

NameVirtualHost *:80

<VirtualHost *:80>
     DocumentRoot "E:/webs/default/"

# Main site

<VirtualHost *:80>
    DocumentRoot "E:/webs/"
    ErrorLog "E:/webs/"
    CustomLog "|C:/Apache/bin/rotatelogs.exe E:/webs/ 86400" combined
share|improve this question

migrated from Aug 18 '09 at 9:17

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Try the Alias directive, e.g.

Alias /virtual_dir /the/path/on/your/filesystem/to/a-page-from-the-cms.html

A more complex solution is to use mod_rewrite, but that's probably overkill.

share|improve this answer
This only applies to aliasing urls to the filesystem. If you want to alias urls to non-file backed content, you will need to use mod_rewrite. – David Pashley Aug 18 '09 at 12:14
what about mod_vhost_alias.? – user993553 Aug 1 '13 at 11:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.