I have an Apache server that I am running on localhost. The root http://localhost should go to a VirtualHost application (Joomla!), while I want http://localhost/test to go to a second VirtualHost - a simple index.html test file. I believe I want to user mod_rewrite for this, so I have that installed.
I have the following two VirtualHosts defined (I am using Ubuntu 11.04):
Root
<VirtualHost localhost>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /srv/joomla
</VirtualHost>
Test
<VirtualHost localhost>
ServerName localhost
DocumentRoot /srv/test
ServerPath /test/
RewriteEngine On
RewriteRule ^(/test/.*) /srv$1
</VirtualHost>
However, when I go to http://localhost/test/index.html or even http://localhost/test I get a 404. What am I doing wrong? Thanks!
localhostand then have a totally separate process runningMonoto handlelocalhost/myapp. It looks like I can probably do this withAlias. Is this the intended way? Is there any way I can do it finer grained, like in a separate VirtualHost? – skaz Aug 30 '11 at 19:32Aliasbut I still figured there would be a better way... – skaz Aug 30 '11 at 20:29