LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2009, 09:50 PM   #1
prudens
Member
 
Registered: Jul 2009
Posts: 52

Rep: Reputation: 15
DNS question


Hi,


I have in my registrar A Host pointed www.domain.com to 192.222.1.1 (suppose that's my IP)

and I have a forums subdomain on it: forums.domain.com, which is located in /var/www/forums

But whenever I visit forums.domain.com, it actually just goes to domain.com...

So, how do I point forums.domain.com to 192.222.1.1/forums?


Thanks in advance
 
Old 07-23-2009, 12:57 AM   #2
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
If www.domain.com and forums.domain.com are the same machine, then this isn't a DNS question it is an Apache question. You need to create a virtual web server on the machine to support forums.domain.com.

In your /etc/httpd/conf/http.conf file (you don't tell us which distro so I'm assuming RHEL or a derivative), add something like this:-
Code:
<VirtualHost 192.222.1.1:80>
  ServerName       forums.domain.com
  ServerAdmin      webmaster@domain.com
  DocumentRoot     /var/www/forums
</VirtualHost>
Google "Apache virtual host" if you need to understand these settings.

If this is all too complicated, install WebMin and use it to configure your Virtual Host settings for you.

Last edited by blacky_5251; 07-23-2009 at 12:59 AM.
 
Old 07-23-2009, 01:00 AM   #3
thewebhostingdir
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 0
I am assuming that the domain.com and forums.domain.com are on the same server..
you do not need to point the subdomain to IP/forums. You just need to point forums.domain.com to your IP address.

As far as I know, this will redirect the subdomain to the particular directory..

If this still not work (after giving some time for propagation), you can add a CNAME record for forums pointing to the same IP..

Last edited by thewebhostingdir; 07-23-2009 at 01:04 AM.
 
Old 07-23-2009, 01:40 AM   #4
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
If forums.domain.com is a different website on the same server, then you need to add the VirtualHost entry I provided earlier.

It doesn't happen by magic...
 
Old 07-24-2009, 12:15 AM   #5
prudens
Member
 
Registered: Jul 2009
Posts: 52

Original Poster
Rep: Reputation: 15
It's Ubuntu. Same server. How do I do it?
 
Old 07-24-2009, 12:20 AM   #6
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
Its Apache. Read their doco on virtual hosts - http://httpd.apache.org/docs/1.3/vhosts/
 
  


Reply


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
A DNS learner's question->Is my DNS configuration right? saagar Linux - Newbie 4 01-12-2009 09:44 AM
question about dns crash88 Linux - Networking 6 06-24-2006 03:32 PM
DNS Question Huntdawg Linux - Networking 4 09-16-2004 09:28 PM
dns question -- new to dns gadhiraju Linux - Networking 7 05-09-2001 06:59 PM
dns question -- new to dns gadhiraju Linux - General 2 05-09-2001 08:44 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration