?
Solved

DNS Question

Posted on 2001-09-06
11
Medium Priority
?
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

 

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
 
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 1200 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

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 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