I have configured my Apache 2.2 in Windows as follows:
First deny all access top-down from the top-level-path ...
<Directory "/">
Options None
AllowOverride All
Order deny,allow
Deny from all
</Directory>
Second configure the virtual hosts, one for DynDNS allowing access from all and a local one with local IP access restriction only ...
Listen *:80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName dyndnsdomain.example.com
DocumentRoot "/PathTo/dyndnsdomain/htdocs/"
<Directory "/PathTo/dyndnsdomain/htdocs/">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName localdomain
DocumentRoot "/PathTo/localdomain/htdocs/"
<Directory "/PathTo/localdomain/htdocs/">
Order allow,deny
Allow from 127.0.0.1
</Directory>
</VirtualHost>
Third the hosts file ...
127.0.0.1 localdomain
The problem is I can't reach the DynDNS Domain. DynDNS and port forwarding are configured correctly. My Router sends updates to my DynDNS provider as well. The Directory
directives are working as expected while removing them restricts the access to the local host.
My questions are:
- Is my Apache configured correctly?
- If not what should I change? and
- If yes any suggestions whats going wrong?