LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 08: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-22-2009, 11:57 PM   #2
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

Rep: Reputation: 61
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-22-2009 at 11:59 PM.
 
Old 07-23-2009, 12: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 12:04 AM.
 
Old 07-23-2009, 12:40 AM   #4
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

Rep: Reputation: 61
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-23-2009, 11:15 PM   #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-23-2009, 11:20 PM   #6
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:10 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