Get Paid to Participate     Twitter     Facebook     Google+
Hosting Discussion
 

Hosting Discussion > Web Hosting Forums > Hardware and Server Configuration > Wilcard DNS Forwarding. **Question**
forgot password?


Reply


Old
  Post #1 (permalink)   03-20-2005, 01:21 AM
HD Guru
 
Equinox's Avatar
 
Join Date: Nov 2004
Location: South Africa
Posts: 592
Send a message via MSN to Equinox

Status: Equinox is offline
I was just wondering:
A project I'm working on for Artashes requires that a subdomain be created for each client. This needs to be automated. I definitely dont want to give PHP access to below web-server root files (such as Zone files) so I wondered whether you could have a DNS entry that creates something like this:

*.mywebsite.com autoforwards to www.mywebsite.com/index.php?board=*

Can this be done with DNS settings or can you think of another way to do it. It needs to be done on a shared account package, so it might be more complicated than I anticipated. Any ideas?

~Equinox
__________________

[ Currently hosting with: Softlayer, Hetzner, Linode, AcuNett ]
 
 
 


Old
  Post #2 (permalink)   03-25-2005, 06:31 PM
HD Wizard
 
ANMMark's Avatar
 
Join Date: Sep 2004
Location: Pennsylvania
Posts: 1,606

Status: ANMMark is offline
He's using CPanel I believe, and this can be done by interfacing with CPanel , via a php script.

If you need assistance with it, just let me know.
__________________
Mark - Co-President/Lead Developer
avidInteractive Software
The ServeraSuite 2007 Award Winning Professional Server Monitoring Solution - Click here
 
 
 


Old
  Post #3 (permalink)   03-31-2005, 05:08 PM
HD Newbie
 
Join Date: Mar 2005
Location: Irvine,California, USA
Posts: 23
Send a message via Yahoo to niteanddayhost

Status: niteanddayhost is offline
Here you go, read away and have fun. Its pretty easy, just a few lines in your httpd.conf file. If you have any questions, pm me or reply.

~
<VirtualHost 192.168.0.1>
ServerAlias *.theclixnetwork.com
RedirectMatch 301 (.*) http://www.clixnetwork.com$1
</VirtualHost>
~

http://www.clixnetwork.com/articles/...d-dns-redirect
__________________
Jon Campbell
Nite and Day Web Hosting
www.niteanddayhosting.com
 
 
 


Old
  Post #4 (permalink)   03-31-2005, 05:24 PM
HD Newbie
 
Join Date: Mar 2005
Location: Irvine,California, USA
Posts: 23
Send a message via Yahoo to niteanddayhost

Status: niteanddayhost is offline
Sorry, I only answered 1 of your questions, I would use a php script and sql to have it take care of the httpd.conf file, maybe even let httpd.conf be writeable by nobody or apache and have it update the httpd.conf file directly. As for the zonefiles, I would probably have a perl script that pull from the sql database, I would have it run by cron, so I could avoid having the zonefiles writeable nobody or apache. The only problem with the cron job is that the script would have a delay for creating new zones. I would probably have the cron run every hour.
__________________
Jon Campbell
Nite and Day Web Hosting
www.niteanddayhosting.com
 
 
 


Old
  Post #5 (permalink)   04-01-2005, 05:35 AM
HD Guru
 
Equinox's Avatar
 
Join Date: Nov 2004
Location: South Africa
Posts: 592
Send a message via MSN to Equinox

Status: Equinox is offline
eish, that sounds scary...
Surely there must be an entry you can make that just says xxx.domain.com forwards to www.domain.com/xxx ????
__________________

[ Currently hosting with: Softlayer, Hetzner, Linode, AcuNett ]
 
 
 


Old
  Post #6 (permalink)   04-01-2005, 10:21 PM
HD Wizard
 
ANMMark's Avatar
 
Join Date: Sep 2004
Location: Pennsylvania
Posts: 1,606

Status: ANMMark is offline
do you have to do this continuously, or just once?
__________________
Mark - Co-President/Lead Developer
avidInteractive Software
The ServeraSuite 2007 Award Winning Professional Server Monitoring Solution - Click here
 
 
 


Old
  Post #7 (permalink)   04-02-2005, 02:37 AM
HD Guru
 
Equinox's Avatar
 
Join Date: Nov 2004
Location: South Africa
Posts: 592
Send a message via MSN to Equinox

Status: Equinox is offline
Continuously...
__________________

[ Currently hosting with: Softlayer, Hetzner, Linode, AcuNett ]
 
 
 


Old
  Post #8 (permalink)   04-02-2005, 03:36 AM
HD Guru
 
Equinox's Avatar
 
Join Date: Nov 2004
Location: South Africa
Posts: 592
Send a message via MSN to Equinox

Status: Equinox is offline
See with free DNS services in the past I have been able to use * as a wildcard and have it forward to that * anywahere in the following URL. I dont want to give Apache or PHP access to anything below the www root and therefore cant have it automatically edit the zone files. Surely there must be a way to dynamically do it in MX and Zone files???? *grrrrr* *self-combust*
__________________

[ Currently hosting with: Softlayer, Hetzner, Linode, AcuNett ]
 
 
 


Old
  Post #9 (permalink)   04-05-2005, 12:22 PM
HD Master
 
othellotech's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 414
Send a message via Skype™ to othellotech

Status: othellotech is offline
wildcard dns entry forwarding to apache runing a script which catches the referring url to the 404 and parses it - not straightforward but possible

the "normal" method is to do as you've been advised - update the httpd conf
__________________
Rob Golding Othello Technology Systems Ltd (AS29527) est 1996.
UK VPS & Private Cloud Servers | UK Linux + Windows Shared Hosting | London Colo
Affordable Domain Registration @ OthelloNAMES.net (ICANN Accredited) - Free Domain Reseller A/c - PM me.
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: