Apache2 mod vhost_alias - problems with .htaccess mod rewrite
For those not familiar with mod vhost_alias it allows you to configure dynamic virtual hosts within apache.
For example loading http://test.localdev/ reads from the dynamic site /var/www/test , and loading http://FOOBAR.localdev/ will read from /var/www/FOOBAR
Heres is the configuration:
However as soon as I throw a .htaccess with modrewrite into one of my dynamic virtual hosts I get some funky errors.
example .htaccess file in /var/www/test/:
[HTML]<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
<p>Please contact the server administrator,
email@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<address>Apache/2.2.3 (Debian) PHP/5.2.0-10 Server at test.localdev Port 80</address>[/HTML]
this is what I get in the error.log:
This setup with .htaccess works correctly if I configure test.localdev as a normal apache vhost. However defeats the purpose of a single dynamic virtual hosts configuration.
Has anybody has success with dynamic virtual hosts and .htaccess rewrite?
Oh I have also tried placing the modrewrite rules directly into the apache configuration (no .htaccess) and its still the same.
Hope someone can help!
Event weirder I get this in my error logs when I access http://test.localdev/pages/foo
why would it be looking for /var/www/test/var ?? when I create the file /var/www/test/var and put some text in it, that text gets displayed when I load http://test.localdev/pages/foo O__o weird!!!
again here is the file in /etc/apache2/sites-enabled/dynamic_vhosts
I have tried this on two different apache2 installs and I get the same result both times.. what am i doing wrong ??
|All times are GMT -5. The time now is 12:52 AM.|