Estou tentando configurar minha configuração local do Apache da seguinte forma:
http://localhost/
deve veicular ~/
http://development.somedomain.co.nz/
deve veicular ~/sites/development.somedomain.co.nz/
https://development.assldomain.co.nz/
deve veicular ~/sites/development.assldomain.co.nz/
Eu só quero permitir conexões de nossa rede local (192.168.1. * intervalo) e eu (127.0.0.1).
Eu configurei meu arquivo de hosts com:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 development.somedomain.co.nz
127.0.0.1 development.assldomain.co.nz
127.0.0.1 development.anunuseddomain.co.nz
Minha configuração do Apache se parece com:
Listen 80
NameVirtualHost *:80
<VirtualHost development.somedomain.co.nz:80>
ServerName development.somedomain.co.nz
DocumentRoot "~/sites/development.somedomain.co.nz"
DirectoryIndex index.php
<Directory ~/sites/development.somedomain.co.nz>
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost localhost:80>
DocumentRoot "~/"
ServerName localhost
<Directory "~/">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<IfModule mod_ssl.c>
Listen *:443
NameVirtualHost *:443
AcceptMutex flock
<VirtualHost development.assldomain.co.nz:443>
ServerName development.assldomain.co.nz
DocumentRoot "~/sites/development.assldomain.co.nz"
DirectoryIndex index.php
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /Applications/XAMPP/etc/ssl.crt/server.crt
SSLCertificateKeyFile /Applications/XAMPP/etc/ssl.key/server.key
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
<Directory ~/sites/development.assldomain.co.nz>
SSLRequireSSL
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
</IfModule>
http://development.somedomain.co.nz/
http://localhost/
e https://development.assldomain.co.nz/
funcionam bem.
O problema é quando eu solicito http://development.anunuseddomain.co.nz/
ou http://development.assldomain.co.nz/
que responde com o mesmo http://development.somedomain.co.nz/
Eu quero negar todas as solicitações que não correspondem a um nome de servidor host virtual e todas as solicitações a um host https solicitadas com http
PS Estou executando o XAMPP no Mac OS X 10.5.8