custom subdomains

zoney70

New member
Joined
Oct 22, 2005
Messages
4
I'm not sure how to accomplish this without stepping on DA or DA stepping on my stuff. The way DA manages subdomains does not offer anywhere near enough flexibility to suit my purposes. This part of DA could use a major rewrite in my estimation.

I have added a wildcard DNS A record *.domain.tld. In a nutshell, here is what I want to do with it:

I want to add a couple of dozen or so VirtualHost sections to the Apache configuration, each implementing a subdomain of the wildcard domain. (subdomain.domain.tld) I don't need instructions on how to write these sections. I do want to avoid DA adding all of those silly unnecessary A records to my DNS which already has a wildcard as stated above. Also I need to control the location of DocumentRoot for each of these subdomains. Therefore, I obviously can't use the so-called subdomain feature. There does not seem to be a custom "virtualhost" feature.

However, the httpd.conf customization feature instructs me not to insert whole VirtualHost sections.

How do I workaround these issues and still use DA? Can I simply ignore the warning against adding VirtualHost sections if I am managing the whole section? If not, why not?

(I am the admin, if that makes any difference)
 
zoney70 said:
I'm not sure how to accomplish this without stepping on DA or DA stepping on my stuff. The way DA manages subdomains does not offer anywhere near enough flexibility to suit my purposes. This part of DA could use a major rewrite in my estimation.
DA is designed for the needs of most hosting companies; it's not designed for specialty programming. I don't see why it should be rewritten because one, two, or ten users would like it to work in all custom situations, and you've not convinced me.
I have added a wildcard DNS A record *.domain.tld. In a nutshell, here is what I want to do with it:

I want to add a couple of dozen or so VirtualHost sections to the Apache configuration, each implementing a subdomain of the wildcard domain. (subdomain.domain.tld) I don't need instructions on how to write these sections. I do want to avoid DA adding all of those silly unnecessary A records to my DNS which already has a wildcard as stated above. Also I need to control the location of DocumentRoot for each of these subdomains. Therefore, I obviously can't use the so-called subdomain feature. There does not seem to be a custom "virtualhost" feature.
You are absolutely correct in all your points.
However, the httpd.conf customization feature instructs me not to insert whole VirtualHost sections.
That is also correct.
How do I workaround these issues and still use DA? Can I simply ignore the warning against adding VirtualHost sections if I am managing the whole section? If not, why not?
Go ahead and create custom code, and check to see where DA puts it. You'll see that if you try to create a custom VirtualHost section DA will NOT put it in the right place, because that's not what it's designed to do.
(I am the admin, if that makes any difference)
It makes a difference in that you can always log in, su to root, and create your own custom VirtualHost sections and your own includes in the /etc/httpd/conf/httpd.conf file to point to them.

You could of course not use wildcard entries in DNS; there are lots of reasons published on the 'net as to why they're not a good idea.

But you seem to know what you can do, and why you want to do it, so the only thing I can say is that you can do it manually the way I suggest, and that DA won't step on it, nor will it step on DA.

But of course DA won't manage it either, because it's simply not designed to do that.

Jeff
 
Re: Re: custom subdomains

jlasman said:
... you can always log in, su to root, and create your own custom VirtualHost sections and your own includes in the /etc/httpd/conf/httpd.conf file to point to them.

...

But you seem to know what you can do, and why you want to do it, so the only thing I can say is that you can do it manually the way I suggest, and that DA won't step on it, nor will it step on DA.

But of course DA won't manage it either, because it's simply not designed to do that.
Thank you. That is the information I needed. It wasn't clear to me before exactly what DA does with httpd.conf.


You could of course not use wildcard entries in DNS; there are lots of reasons published on the 'net as to why they're not a good idea.

The Web is of course chock full of free advice, with much of it misinformed or uninformed or self serving or whatever. However, I would welcome pointers to specific sites that recommend against wildcard subdomains so that I can make my own evaluation of the competence of the advisor and the worth of the advice.
 
This RFC shows just one problem with wildcard DNS.

Another good reference can be found in another RFC, here.

The book DNS and Bind has some reference material on using wildcards; you can see the table of contents here.

My biggest problem with wildcard DNS is that it doesn't work if there's any other reference to a subdomain; for example, if you've got a subdomain joe.example.com, accessed by an A record for *.example.com, and then later you add an mx record for joe.example.com, then the wildcard A record will stop working and it may take a while to figure out why.

Jeff
 
Back
Top