Apache, Directory Aliases and Virtual Directories
I realized I misconfigured Apache the other day. Apache wasn't serving files from my virtual directory, rather from the root folder named the same. After looking at my Apache configuration, I noted I was missing a leading slash in my Alias directive. Sort of hard to spot, so I hope this helps someone else.
This is the misconfigured version: ( Bad )
<Directory "C:/httpd/Apache2/htdocs/Portal/www">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
This is the one that works: ( Good )
<Directory "C:/httpd/Apache2/htdocs/Portal/www">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Note: The slashes have been changed from \ ( Windows Style ) to / ( Unix Style ). For some reason this mattered.....








Alias /myfolder "C:/path/to/myfolder/"
<Directory "C:/path/to/myfolder/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
So when I type http://www.mysite.com/myfolder without slash in browser it still loads. If I had "Alias /myfolder/" I am required to type the trailing slash in the browser or I get an error "The requested URL /myfolder was not found on this server.".