Forum Moderators: phranque

Message Too Old, No Replies

Setting Up Apache2 Sub Subdomains and DynDns

apache apache2 sub subdomains dyndns

         

spewy_stuey

3:25 am on Jul 6, 2006 (gmt 0)

10+ Year Member



To allow sub subdomains using dyndns and apache2, follow these steps. You only need to edit the apache 'httpd.conf' file, and the 'hosts' file.

My webserver is:
Windows XP Pro
Apache 2.0.52
PHP 5.1.4

EXAMPLE SETTINGS:
To have john.dyndnsdomain.com & sub.john.dyndnsdomain.com working correctly, add the following to your apache 'httpd.conf' file:

#the domain you have with dyndns
<VirtualHost 127.0.0.1>
DocumentRoot "c:/web/htdocs"
ServerName localhost
</VirtualHost>

#the sub subdomain you want to have
<VirtualHost 127.0.0.1>
DocumentRoot "c:/web/otherdomain"
ServerName sub.localhost
</VirtualHost>

#now you have to add extra needed lines
<VirtualHost 127.0.0.1>
DocumentRoot "c:/web/htdocs"
ServerName john.dyndnsdomain.com
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "c:/web/otherdomain"
ServerName sub.john.dyndnsdomain.com
</VirtualHost>

Ok, now edit the hosts file, I'm assuming you can find it, and change to the following:

127.0.0.1 localhost
127.0.0.1 sub.localhost
127.0.0.1 john.dyndnsdomain.com
127.0.0.1 sub.john.dyndnsdomain.com

Ok, copy and paste all that to the correct files, then change "c:/web/htdocs" & "c:/web/otherdomain" to your web directories.

Then change 'john.dyndnsdomain.com' & 'sub.john.dyndnsdomain.com' to your web domain names.

I spent a few hours trying to get this to work, it all looks simple to me now though, I hope it helps somebody!

----
SpewyStuey