• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

DNS Question

I am trying to run multiple vhosts on apache which isn't the problem. I need to have a way to use dns so that when a request is made to whatever.domain.com it accepts it so that I can have a rewrite rule in apache forward it to www.domain.com/script/whatever. I guess basically I just need a way to accept queries to whatever subdomain people call. I will have a list of translations in apache, but is there a way to basically except all subdomain requests?
0
phreakin
Asked:
phreakin
  • 3
  • 2
  • 2
  • +4
1 Solution
 
BlackDiamondCommented:
The easiest way to do this is to CNAME all of the hostnames in DNS to your single apache server ip.  Then you will need to add a named VirtualHost directive in your httpd.conf for each of the domain names.  Then you would point the Document Root to wherever you want the site to start.

Take a look here:
http://www.apache.org/docs/vhosts/
0
 
phreakinAuthor Commented:
That wouldn't work, we would be adding them dynamically and there would be several thousand. Anyone have experience with lbnamed?
0
 
BlackDiamondCommented:
ok, you should be able to do what you want with mod_rewrite.  A translation like the one you specified should be workable with a single regular expression.  Take a look at http://httpd.apache.org/docs/misc/rewriteguide.html 
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
phreakinAuthor Commented:
I can do it with mod_rewrite, and I already have the rewrites in place. The problem is with DNS. I can rewrite the url's fine, but without the server accepting connections to the specific sub domains, it doesn't do any good.
0
 
BlackDiamondCommented:
Ok, what do you have so far?  Do you CNames for the Domains set up to that server?  There should be no reason that the server will not accept any connection, as long as the domain name that is referenced resolves to one of your servers listening ip's.  If I am way off here, please fill in the blanks.
Thanks,
BD
0
 
ahoffmannCommented:
this is not a apache problem, but DNS and/or routing.
The router/gateway before your apache server needs to know how to reach www.whatever.dom, which must be a route to your apache server.
Ususaly each domain (like whatever.dom) has a default NS entry in the INTERNIC database, this server is responsible for resolving DNS queries.
0
 
ifinchamCommented:
Hi,

I'd also think vhosts is the answer - or more specifically --> http://httpd.apache.org/docs/vhosts/mass.html .

Rgds
0
 
The--CaptainCommented:
ahoffman is correct about this problem having nothing (much) to do with apache.

phreakin - if you don't have control over your client's DNS config, you can forget about all this right now.  If you do have control over which DNS server they use, you can probably (although I've not explicitly verified this functionality) do what you want by setting up your own dns server with Bind 9.

O'Reilly was suppoed to release the new edition convering BIND 9 in June - haven't had a chance to grab it yet.

-Jon

 
0
 
aacostaCommented:
Hi,
  I did not understand 100% your question, but I guess you could try a mix between ServerName and ProxyRemote in apache.
  For example, you could use ServerName * and you apache should answer all the queries made. And with ProxyRemote you could try to proxy the request. In fact, Proxyremote supports this:
ProxyRemote * http://abc.com

Alejandro,-
0
 
The--CaptainCommented:
aacosta may have a decent solution wrt to deferring DNS lookups until they reach the "proxy" (which would presumably also be your web server), but once again, if you do not have control over your client's configs, you are screwed.

-Jon

0
 
MoondancerCommented:
This question appears to have been abandoned. Your options are:
 
1.  Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3.  Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4.  Delete the question. Again, you must tell the other participants why you wish to do this.
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
 
PLEASE DO NOT AWARD THE POINTS TO ME.  
_________________________________________
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 3
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now