> Eric C: You can't make the catch-all vhost also be a reachable name-based
> vhost, with those rewrite rules. Create an additional one
> solely for that purpose.
> Jeroen G: Get rid of all the rewrite junk and just set a dummy servername;
> this will catch ALL undefined hostnames.
> Then Redirect / to the correct vhost.
Ah ha! The issue was that doing "ServerAlias *" crashes Apache with no error
log. ServerAlias apparently needs more than just a
single wildcard character. Putting the below <VirtualHost> entry after the
last <VirtualHost> works great! Sweet.
<VirtualHost *:80>
ServerName my-catch-all-dummy-domain.com
ServerAlias *.com *.net *.org *.co *.mobi *.info *.me *.us *.biz *.tv
*.ws
RewriteEngine On
RewriteRule .* http://www.mydomain.com%{REQUEST_URI} [L,R=301]
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
Now I cannot do the same thing for the 443 virtual host section - adding the
below <VirtualHost> section crashes Apache with the
below strange error:
[Thu Jun 02 04:55:13 2011] [error] Illegal attempt to re-initialise SSL for
server (theoretically shouldn't happen!)
<VirtualHost *:443>
ServerName my-catch-all-dummy-domain-SSL.com
ServerAlias *.com *.net *.org *.co *.mobi *.info *.me *.us *.biz *.tv
*.ws
RewriteEngine On
RewriteRule .* https://www.mydomain.com%{REQUEST_URI} [L,R=301]
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]