News
Linux: VirtualHosts on Apache
I have a little apache server running on my desktop to test out stuff. Every web developer does have one.
I have configured mine to use virtual hosts. In my local DNS (another machine), I pointed all subdomains of my desktop to my desktop as well. An example: subdomain.desktop.mydomain.home is pointing at my desktop (desktop.mydomain.home).
Now I can have my apache on my desktop treat subdomains of itself as seperate websites, with the use of VirtualHosts. This has always worked very well, untill today. Something must have changed in the parsing of the config. This is no longer valid, it seems:
<virtualhost>
DocumentRoot /var/www/subdomain/htdocs
ServerName subdomain.desktop.mydomain.home
<directory var="" www="" subdomain="" htdocs="">
AllowOverride All
Options FollowSymLinks
Order allow,deny
Allow from All
</directory>
RewriteEngine On
RewriteOptions inherit
</virtualhost>
I had to put the values of DocumentRoot and ServerName between quotes before I got them to work again, like this:
<virtualhost>
DocumentRoot "/var/www/subdomain/htdocs"
ServerName "subdomain.desktop.mydomain.home"
<directory var="" www="" subdomain="" htdocs="">
AllowOverride All
Options FollowSymLinks
Order allow,deny
Allow from All
</directory>
RewriteEngine On
RewriteOptions inherit
</virtualhost>Hope this helps...

