icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Private Hosting » Apache/BIND Question

Private Hosting Questions about VPS, dedicated servers and colocation.

Reply
 
LinkBack Thread Tools Search this Thread
Old March 4th, 2005, 8:56 PM   #1 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Apache/BIND Question

I'm interested in setting up dynamic subdomains for one of the websites on my server. What I'm hoping to set up is that (name).mydomain.com redirects to mydomain.com/filename.php?variablename=(name)

Anyone have any advice on how to set this up?
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 4th, 2005, 10:21 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,079 posts
Gave thanks: 48
Thanked 131 times
I think you can do this in CPanel, after you make a subdomain, you can redirect it to the URL you want.

Steps:
1. Make subdomain.
2. Choose subdomain below, and hit "Setup Redirection"
3. Put in URL, hit apply.

That should be right anyways.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 4th, 2005, 10:47 PM   #3 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Quote:
Originally Posted by Haugland
I think you can do this in CPanel, after you make a subdomain, you can redirect it to the URL you want.

Steps:
1. Make subdomain.
2. Choose subdomain below, and hit "Setup Redirection"
3. Put in URL, hit apply.

That should be right anyways.
No, this much I know. I'm talking about dynamic subdomains that are available for every user that signs up to the website, when they sign up. Sort of like URL Redirection services like cjb.net

I've been reading in the Apache Documentation online and I don't fully understand the documentation. I've read an implementation using php on one website (liquidpulse), but I'm trying to set it up strictly using just server settings.
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 4th, 2005, 11:16 PM   #4 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,079 posts
Gave thanks: 48
Thanked 131 times
Ahh.. I'm not quite sure on that then...
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 4th, 2005, 11:55 PM   #5 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Quote:
Originally Posted by Haugland
Ahh.. I'm not quite sure on that then...
Thanks though, and I figured it out. Took me a little while to get it set up, but persistance is the key
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 4th, 2005, 11:56 PM   #6 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,079 posts
Gave thanks: 48
Thanked 131 times
Ahh, good you got it working. Always nice to hear that
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 28th, 2005, 5:01 AM   #7 (permalink)
Registered User
Comfy Contributor
 
peconi's Avatar
 
Joined in Dec 2004
150 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
Can you tell us how?
__________________
PeconiHosting.com <-- new design
Wicked-Templates.com - High Quality Web Templates
Peconi.com - My Personal Website
BlackPearl Dedicated Server

20% discount on hosting 4 students!
peconi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 28th, 2005, 7:50 AM   #8 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,387 posts
Gave thanks: 28
Thanked 94 times
Quote:
Originally Posted by mr_fern
Thanks though, and I figured it out. Took me a little while to get it set up, but persistance is the key
Do tell. How did you do that? This forum is all about sharing the knowledge, so please - let us have your 'step by step'.

John
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 28th, 2005, 4:09 PM   #9 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
I hope I explain this well enough because I know I'm not the greatest person when it comes to technical explanations. My explanation requires that you have the WebHostManager from CPanel.Net

First Step:
In WHM, choose DNS Functions, and select Edit A DNS Zone. Select the domain to which you wish to add these dynamic subdomains onto and then click Edit. Scroll down to where it says "Add Entries Below This Line". In the first field enter the wildcard character (*), leave the areas where it says "14400 IN A" as is and in the next field put the IP address for the site. After you've done this, click Save.

Second Step:
You will need to open up your httpd.conf file, and find where the <VirtualHost></VirtualHost> information is for the domain you wish to work with.

Add into this VirtualHost area the following:

ServerAlias *.yourdomainname.ext

RewriteEngine on
RewriteCond %{HTTP_HOST} !^domainname\.ext$
RewriteCond %{HTTP_HOST} !^www\.domainname\.ext$
RewriteCond %{HTTP_HOST} ^(.+)\.crushspot\.ext$
RewriteRule . http://www.domainname.ext/filename.php?variablename=%1 [R]

Of course the rewrite rule may be a bit different depending upon what you are intended to do, but that's the basic gist of it.

Final Step:
Restart Apache and BIND
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On