Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-25-2006, 03:48 PM   #1
Tear Syden
LQ Newbie
Registered: Mar 2006
Posts: 20

Rep: Reputation: 0
Some questions about DNS, subdomains, and HTTP

Hey everyone. I'm still a Linux newbie. I've been on FC4 for about a week now and I'm loving it. I've been a win95 then 98 thenXP user for as long as I can remember and I've become quite literate in a windows environment (which isn't actually difficult as you all know >.<)
Linux is great because its a challenge for me. I love how every time I click the mouse or type something into Terminal I learn something new. I've always come back here to ask questions and I've gotten helpful answers most of the time.

My first questions is about Subdomains. I currently have a free domain at and am running a website off my linux box here at home. We have a great dedicated internet connection so I figured I could run my own server instead of buying a hosting package (because you usually have more control over things if you do them yourself). So I worked for a while and got the Apache server working. It hosts and it has PHP, MySQL, PERL and a bunch of other nice modules.
I was trying to set up a subdomain in my server but I can't seem to figure it out. I have my website (dragontech dot game-host dot org) and it works fine. What I was trying to do was get a subdomain working. (meridian dot dragontech dot game-host dot org) and I was wondering how you'd go about doing that.
I've put two virtualhost directives in my httpd.conf file; one with the subdomain and one with the main domain, but it has occurred to me that its not the apache server that has the problem at the moment. if you go to either the subdomain or the main domain, they both come up as the same thing, the index.php file on dragontech dot game-host dot org. The file index.html (for the meridian subdomain) is located in the html folder of the server in another folder /meridian where the entire subdomain was to be located.
The questions was what do I need to do to get it to work?

The second question involves what I think MAY be a solution to the first question. Does a subdomain need to be configured from the DNS host?
I also have a paid Domain Name and hosting service (which I can soon hopefully get rid of) and in the control panel I have the option to 'create subdomains'. This is what leads me to believe that alongside the apache configuration I need to create subdomains in the Domain Name, which I don't think you can do with a free DNS service.
I was wondering how to get around this. Would I have to:
-->Purchase a domain name and subdomains,
-->Use 'BIND' or the 'Domain Name System' built into FC4 (if so, I
have no idea what to do with it), or
-->Configure something else that would sneak around this problem.

You guys have been an amazing help so far and I think this community is great. I hope that one day I can be one of the guys that answers questions like this and helps newbies like myself, haha.

Old 03-26-2006, 08:53 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the subdomain is handled by apache for the web traffic of course, you would use a name based virtualhost record, and simply have an entry that states that a given virtual host is that domain, by identifying it with the ServerName (and maybe ServerAlias for local abbreviations etc..) in that virtualhost.

What this requires primarily though is that the traffic gets sent to your box in the first place, which is where DNS comes into it. I've no idea what dyndns will or won't do, but i use Zoneedit.comn which gives superb free dns record control, and you can add all the subdomains you want. personally i'd expect that *if* dyndns won't let you do that, it will simply forward all subdomains to your server anyway, so it'd just be down to the virtualhost to accpet the traffic. in your /var/log/httpd/access.log or equival;ent, are requests hitting your server for the subdomain connection attempts? Whatever the scenario is, i wouldn't look at is as reqiring a workaround or "sneaky" fix to get what you want, just down to how much you want to do yourself.
Old 03-26-2006, 01:44 PM   #3
Tear Syden
LQ Newbie
Registered: Mar 2006
Posts: 20

Original Poster
Rep: Reputation: 0

Thank you very much for the information. I was checking the log to see if it forwards the subdomain. It does forward it and it just so happens that my .conf file was pointing the subdomain to the wrong folder XD.

Thanks for the help!

Last edited by Tear Syden; 03-26-2006 at 02:02 PM.


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 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
BIND/DNS: Some subdomains resolve, some don't natetheros Linux - Networking 0 04-22-2005 06:36 PM
a question about http or dns not sure? peterb Linux - Networking 14 12-03-2003 02:32 AM
Odd DNS Problem => No Subdomains... papasan Linux - Networking 1 11-17-2003 03:17 PM
Networking questions : Setting up domains/vhosts/subdomains/IPs etc. Belize Linux - Networking 1 09-16-2003 03:39 AM
[named/DNS] How do you create subdomains? BxBoy Linux - Networking 7 01-12-2003 09:37 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:55 PM.

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