LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-24-2008, 07:10 PM   #1
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Rep: Reputation: 15
Virtual server and domain forwarding


I have a domain setup at GoDaddy that I want to forward to a sub domain that is currently setup as a virtual server on my box, can this be done?

I made the changes I thought I needed to do but I'm getting the default website on the server - like the forwarder isn't sending the correct information in the header for Apache to parse...just a thought.

Hopefully some one can give some guidance..

Thanks.

TW,
 
Old 02-24-2008, 07:51 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
If I understand you right, you have a HTTP server set up on a box at home; for the sake of example, let's call it yourbox.somedomain.com. And you also have a GoDaddy account that contains a HTTP server.

In order to get users to be redirected to yourbox.somedomain.com, you need to do two things:

1. Make sure that the DNS system resolves yourbox.somedomain.com to the IP address of your box at home. It may not happen immediately when you make some change to some DNS server, because it takes some time before all DNS servers in the world notice the change you make. But once the DNS system comes up with the right IP address for your box at home, then you are in a good position to re-direct requests that currently go to your GoDaddy account.

2. According to the GoDaddy FAQ, if your domain is parked there (for HTTP purposes), then you can log in and tell it to redirect any queries to http://yourbox.somedomain.com. I guess that if your domain is not parked there, but is actually being served as an active site from their servers, this will not work. Perhaps you can get them to park your domain there, so that you can then redirect it to your box at home.

Good luck
 
Old 02-24-2008, 08:21 PM   #3
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Original Poster
Rep: Reputation: 15
I host off of a box at my location - GoDaddy just houses the DNS records only.

The site yourbox.somedomain.com resolves and is currently active so all is good there. The problem is I want to create a new domain mydomain.com and have it forward to yourbox.somedomain.com.

The site yourbox.somedomain.com is set up on a linux box using virtual hosting and there is a default website for anything not resolving to any of the virtual hosts, normal setup I believe.

What's happening is that after making the changes at GoDaddy for forwarding and directing it to yourbox.somedomain.com the default website on the server is coming up.

Thanks,
 
Old 02-25-2008, 11:58 AM   #4
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
Thanks for the additional description; this narrows down the possibilites. If the Linux box (yourbox.somedomain.com) is running the Apache HTTP server, it should be writing logfiles that will give you some further information about exactly what is happening when a request arrives.

The configuration file (/etc/httpd/conf/httpd.conf on my machines) will specify where the logfiles are written. If you have VirtualHost containers defined for each virtual host on your machine, the logfile name(s) will be enclosed within the <VirtualHost> .... </VirtualHost> tags. The thing to look for is what the request looks like when you attempt to access the new website (mydomain.com). Check which logfile gets a new entry when you attempt such an access, and see what the request looks like. Note that the way virtual hosting works under Apache is that the requested site name must match the string specified in the <VirtualHost> block via the ServerName directive. If the incoming request does not match any declared virtual server name, it will be handled by the default (first-declared) virtual host.

Hope this helps.
 
Old 02-27-2008, 01:51 PM   #5
tiger.woods
Member
 
Registered: Mar 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Thanks for the reply.

I managed to get it working by essentially creating the virtual host mydomain.com on the server and then pointing that host to the directory that contained the yourbox.somedomain.com files.

After a little tweaking on the configuration file it was good to go.

Thanks for your help in this matter.

TW,
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sending mail to another server using virtual domain shipon_97 Linux - Networking 1 11-30-2006 05:26 AM
what would make ever virtual domain name resolve to one domain name on my system kuplo Linux - Newbie 1 11-14-2005 06:57 PM
Forwarding domain to second linux box kimdenmark Linux - Networking 5 11-10-2005 05:56 PM
i have taken a domain name. how to set it up on my virtual dedicated server phpsharma Linux - General 4 03-15-2005 07:30 PM
fetchmail +virtual domain on ISP mail server. Ollie46 Linux - Networking 0 02-11-2004 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration