I'd like to stop Apache from responding to
http://machineName.
I'd prefer it to respond (or redirect?) to
http://machineName.something.com
In my case,
http://intra-beta
should either repond or redirect to
http://intra-beta.domain.ca
Is this related to useCanonicalName ?
Here's a snippet of my httpd.conf
...
ServerName xxx.xxx.xxx.xxx:80
NameVirtualHost *:80
...
UseCanonicalName Off
...
<VirtualHost *:80>
ServerName intra-beta.domain.ca
DocumentRoot "E:/web/intra/htdocs"
ServerAdmin admin@domain.ca
...
</VirtualHost>
<VirtualHost *:80>
ServerName intra.otherDomainFr.ca
DocumentRoot "E:/web/intra/htdocs"
ServerAdmin admin@domain.ca
...
</VirtualHost>
<VirtualHost *:80>
ServerName intra.otherDomainEn.ca
DocumentRoot "E:/web/intra/htdocs"
ServerAdmin admin@domain.ca
...
</VirtualHost>
Edit #1
This seems to work thus far...
RedirectMatch (.*) intra-beta.domain.ca$1
Edit #2
How about a situation like this:
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "E:/web/inter-ssl/htdocs"
ServerName inter-dev.domain.ca:443
ServerAdmin admin@domain.ca
...
</VirtualHost>
If I do the modifications so that it looks like this:
<VirtualHost *:443>
ServerName inter-dev
RedirectMatch (.*) inter-dev.domain.ca$1
</VirtualHost>
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "E:/web/inter-ssl/htdocs"
ServerName inter-dev.domain.ca:443
ServerAdmin admin@domain.ca
...
</VirtualHost>
I get an error related with too many redirects. If I understand correctly, SSL works differently and this fix might not be a correct implementation in this situation?