Discussion
Hey guys, am having trouble setting up my server with domains and subdomains, if anyone can help I'll be very grateful!
What I have.
I have a server.
I have a domain name.
I have a DNS server, and the associated Nameserver.
What I am trying to achieve.
I have set up 4 subdomains as virtual servers, www, jp, en and blog on my apache, using httpd -S i get the output
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 Server31.Register1.net (/etc/httpd/conf.d/ssl.conf:81)
What happens, and Why?
I have created a test index.html file in each of the appropriate virtual servers own root folder saying 'blog root' or 'en root' so I can debug whats going on... BUT
here is the confusing part.
www.akachanwear.com correctly opens up the main www root index.html file
blog.akachanwear.com incorrectly opens up the main www root index.html file
en.akachanwear.com incorrectly opens up the main www root index.html file
jp.akachanwear.com fails to open any page?
Any Guru's around can lend me their brains??
What I have.
I have a server.
I have a domain name.
I have a DNS server, and the associated Nameserver.
What I am trying to achieve.
I have set up 4 subdomains as virtual servers, www, jp, en and blog on my apache, using httpd -S i get the output
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 Server31.Register1.net (/etc/httpd/conf.d/ssl.conf:81)
- :* www.akachanwear.com (/etc/httpd/conf/httpd.conf:992)
- :* en.akachanwear.com (/etc/httpd/conf/httpd.conf:998)
- :* jp.akachanwear.com (/etc/httpd/conf/httpd.conf:1005)
- :* blog.akachanwear.com (/etc/httpd/conf/httpd.conf:1011)
What happens, and Why?
I have created a test index.html file in each of the appropriate virtual servers own root folder saying 'blog root' or 'en root' so I can debug whats going on... BUT
here is the confusing part.
www.akachanwear.com correctly opens up the main www root index.html file
blog.akachanwear.com incorrectly opens up the main www root index.html file
en.akachanwear.com incorrectly opens up the main www root index.html file
jp.akachanwear.com fails to open any page?
Any Guru's around can lend me their brains??
Edited by WTD on Tuesday 30th October 09:17
my virtual servers is this here:
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName www.akachanwear.com
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName en.akachanwear.com
DocumentRoot /var/www/html/en/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName jp.akachanwear.com
DocumentRoot /var/www/html/jp/
</VirtualHost>
<VirtualHost *:80>
ServerName blog.akachanwear.com
DocumentRoot /var/www/html/blog/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName www.akachanwear.com
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName en.akachanwear.com
DocumentRoot /var/www/html/en/
</VirtualHost>
<VirtualHost *:80>
ServerAdmin server@akachanwear.com
ServerName jp.akachanwear.com
DocumentRoot /var/www/html/jp/
</VirtualHost>
<VirtualHost *:80>
ServerName blog.akachanwear.com
DocumentRoot /var/www/html/blog/
</VirtualHost>
You will probably also want an A record for akachanwear.com (blank in the first box)
assuming you want http://akachanwear.com to work
J
assuming you want http://akachanwear.com to work

J
JamieBeeston said:
Makes no real difference in the real world
It makes a massive difference. There's the right way, and the shit to maintain way.JamieBeeston said:
You still need to add each record, and one typo with cnames leads to everything going down, as opposed to just the one record.
You're adding records that are effectively the same apart from the CNAME. If you break that you shouldn't be playing with DNS. You have to add each record regardless. If primary server's IP address changes you then have to change every other A record, whereas a CNAME is automatic - one change versus all the CNAMES. Makes much more sense, and why CNAME is there.cottonfoo said:
JamieBeeston said:
Makes no real difference in the real world
It makes a massive difference. There's the right way, and the shit to maintain way.JamieBeeston said:
You still need to add each record, and one typo with cnames leads to everything going down, as opposed to just the one record.
You're adding records that are effectively the same apart from the CNAME. If you break that you shouldn't be playing with DNS. You have to add each record regardless. If primary server's IP address changes you then have to change every other A record, whereas a CNAME is automatic - one change versus all the CNAMES. Makes much more sense, and why CNAME is there.This is the world of Web based control panels, and DNS control for home users.
RFC's may well say use CNAMEs, but in the real world it makes not a jot.
A records are quicker than CNAMES, and allow crucially allow you to point to different IPS for different hosts.
You're supposed to cross the road only at a marked crossing, doesn't mean that's how it happens does it?
You're making a mountain out of a molehill..
But, as all good vendors should, we provide the client with the option to use CNAME or A records.
J
I still do things that way in business, but you've already mitigated the administration overhead by having all your records in a database with code to deal with those kinds of changes so it just makes sense to keep it simple. You also then don't have to worry about someone assigning a CNAME to the NS or MX records 

Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff



