This might be a stupid question but I'm tired and can't find a solution.
I currently have an Apache Web Server running on Ubuntu 10.4 and I use a DynDNS service to make them accessible to the outside world via a domain and/or subdomain.
My configs currently look like this:
<VirtualHost *:80>
ServerAdmin <obscured>@<obscured>.com
ServerName <subdomain>.<obscured>.com
ServerAlias <subdomain>
DocumentRoot /<obscured>/<subdomain>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /<obscured>/<subdomain>>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow From All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.$host.log
CustomLog ${APACHE_LOG_DIR}/access.$host.log combined
</VirtualHost>
This works fine from access outside of the network and all subdomains resolve to the correct directory.
The problem I am having is with accessing a subdomain over my internal network.
I can access the Web Server using the server's IP address: http://192.168.1.123/
but this always takes me to the same virtual host and I don't know how to distinguish between different virtual hosts (different subdomains).
Ideally I would like to access the same subdomains using http://<subdomain>/
where <subdomain>
is the same as the subdomain attached to the external domain name.
Any ideas?