Solved

DNS Question

Posted on 2001-09-06
11
206 Views
Last Modified: 2010-03-18
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
Comment
Question by:phreakin
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 5

Expert Comment

by:BlackDiamond
ID: 6462062
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
 

Author Comment

by:phreakin
ID: 6462069
That wouldn't work, we would be adding them dynamically and there would be several thousand. Anyone have experience with lbnamed?
0
 
LVL 5

Expert Comment

by:BlackDiamond
ID: 6462197
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
 

Author Comment

by:phreakin
ID: 6462206
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
 
LVL 5

Expert Comment

by:BlackDiamond
ID: 6462244
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6465056
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
 
LVL 2

Expert Comment

by:ifincham
ID: 6467605
Hi,

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

Rgds
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6473995
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
 
LVL 1

Accepted Solution

by:
aacosta earned 300 total points
ID: 6515451
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
 
LVL 16

Expert Comment

by:The--Captain
ID: 6515773
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 6814908
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now