LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2012, 09:19 AM   #1
redhat19
Member
 
Registered: Jan 2012
Posts: 45

Rep: Reputation: Disabled
How can I point a subdomain to a specific folder?


Hi friends,

We have created an application to run on our server but which interfaces with a web application on another organization's server.
We got the them to create a subdomain to point to our server's IP address.
(If you type in our server's IP address, you''ll land on a default Apache/centOS page)

They pointed their subdomain to our server's IP address and now if you go to the subdomain, e.g xyz.mydomain3.com, you'll be looking at a default Apache/CentOS page.

Our server is hosted with Linode, VPS provider.

On our server, the destination/where we have built the web app is mydomain2.com.

How can we point the subdomain, xyz (in xyz.mydomain3.com) to mydomain2.com?


Here's what our Linode DNS manager looks like



Code:
DNS Manager » xyz.mydomain3.com
SOA Record
Primary DNS	Email	Default TTL	Refresh Rate	Retry Rate	Expire Time	Options
ns1.linode.com	myemail@gmail.com	Default	Default	Default	Default	Settings


NS Records
Name Server	Subdomain	TTL	Options
ns1.linode.com	xyz.mydomain3.com	Default	Edit | Remove
ns2.linode.com	xyz.mydomain3.com	Default	Edit | Remove
ns3.linode.com	xyz.mydomain3.com	Default	Edit | Remove
ns4.linode.com	xyz.mydomain3.com	Default	Edit | Remove
ns5.linode.com	xyz.mydomain3.com	Default	Edit | Remove
Add a new NS record


MX Records
Mail Server	Preference	Subdomain	TTL	Options
mail.xyz.mydomain3.com	10		Default	Edit | Remove

Add a new MX record


A/AAAA Records
Hostname	IP Address	TTL	Options
	123.45.68.90	Default	Edit | Remove

mail	123.45.68.90	Default	Edit | Remove

www	123.45.68.90	Default	Edit | Remove

Add a new A record


CNAME Records
Hostname	Aliases to	TTL	Options
Add a new CNAME record


TXT Records
Name	Value	TTL	Options
Add a new TXT record


SRV Records
Service	Domain	Priority	Weight	Port	Target	TTL	Options
Add a new SRV record

NOTE: Changes made to a master zone will take effect in our nameservers every quarter hour.
Any useful help/suggestions would be welcome..

Thanks.
 
Old 09-06-2012, 03:21 PM   #2
Toggan
Member
 
Registered: Oct 2011
Distribution: CentOS 5.9
Posts: 39

Rep: Reputation: 6
This will actually be configured in apache, not in your DNS. You'll need to set up a name based virtual host for the subdomain to point to the folder you would like it to pull up.

http://httpd.apache.org/docs/2.2/vhosts/name-based.html for more information.
 
  


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 Command to Delete the Oldest Sub-folder in a Specific Folder imayneed Linux - Newbie 13 08-05-2012 07:53 PM
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 05:27 PM
Map a subdomain to a folder without redirecting chenxiaolong Linux - Networking 4 09-06-2009 08:36 PM
How can I point a subdomain to another server on the same LAN? apache2 Linux - Server 16 03-01-2009 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:45 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
Open Source Consulting | Domain Registration