View Full Version : [ubuntu] Apache, DynDNS, and subdomains

April 21st, 2009, 01:57 AM
I have successfully configured my server with DynDNS and it works great. My domain is clustur.com. I really want to have subdomains, though. I've looked at many tutorials, but I'm so confused because every tutorial I find is different to my situation. The fact that Ubuntu's apache has a split httpd.conf doesn't help either. Here's what I've tried so far.

I've commented out NameVirtualHost in /etc/apache2/ports.conf
I've created clustur.com.conf in /etc/apache2/sites-available:

<VirtualHost *>
ServerName www.clustur.com
DocumentRoot /var/www

<VirtualHost *>
ServerName nxtpp.clustur.com
DocumentRoot /var/www/nxtpp

Made the symlinks:

sudo a2ensite clustur.com.conf
Restarted apache

I get "Firefox can't find the server at nxtpp.clustur.com." whenever I try to access the nxtpp subdomain. I have index.php in the /var/www/nxtpp folder. Do I need to a2dissite default? What am I doing wrong?

Thanks in advance,
-Cory Walker

April 21st, 2009, 02:00 AM
When I try I get "Welcome to SIXLA".

April 21st, 2009, 02:09 AM
When I try I get "Welcome to SIXLA".

Well I have no idea why you got that (wrong url maybe?). Should I have wildcard enabled on my DynDNS settings? I already tried enabling it and it makes any subdomain direct to my /var/www folder.

April 21st, 2009, 02:18 AM
It's working for me. Displays a page with 4 links on it.

April 21st, 2009, 02:30 AM
It's working for me. Displays a page with 4 links on it.

That's /var/www/index.php. I need nxtpp.clustur.com to display /var/www/nxtpp/index.php.

EDIT: I'm making progress. I followed Tchalvak's post at https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/268868, and now when I visit nxtpp.clustur.com, I am redirected to http://nxtpp.clustur.com/nxtpp/index.php. The problem is, this is actually referring to /var/www/nxtpp/nxtpp/index.php instead of /var/www/nxtpp/index.php. How can I fix this so I am redirected to just nxtpp.clustur.com/index.php?

April 21st, 2009, 03:05 AM
Nevermind! The problem described in my post above was actually due to the $ScriptPath variable in my wiki that needed to be updated as a result of the new subdomain. Before it needed to be "/nxtpp" and now it just needs to be set at "". Well thanks guys for all the.. eh.. visiting pages. ;)


April 21st, 2009, 05:06 AM
Looks good! I was before the time of Mindstorm units, and I've outgrown Lego now, but it looks like a lot of fun!