LinuxQuestions.org
Visit Jeremy's Blog.
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 01-01-2010, 02:49 AM   #1
timothyb89
Member
 
Registered: Jul 2006
Location: Colorado, USA
Distribution: openSuSE 11.4
Posts: 118

Rep: Reputation: 15
LAN Subdomains


I'm trying to figure out a decent way to manage subdomains for my local server. Essentially, I have a Tomcat server (currently running on port 8080) and an Apache server (port 80) but due to some issues with Apache's vhosts, I'm planning on changing the setup so each server is running on port 80, but with virtual interfaces (ie, apache on eth0:0 and tomcat on eth0:1). In the future I'll probably add some physical servers to the network, so having a process that works the same in both situations is a definite plus.

Then my issue (assuming my entire idea isn't insane) is domain management. What I'd like to do is have my apache server on domain.com, and the tomcat server on tomcat.domain.com, but I don't know how to have the router point requests toward the correct IP. The router is running dd-wrt, but a quick poke around its web interface revealed nothing helpful (I'm not afraid to poke around the rest of the system if I actually know what I'm doing, however).

Any suggestions to manage this?

I'm sort of a networking n00b and I'm probably forgetting all of the actually important details, so feel free to ask for clarification

Thanks!
 
Old 01-01-2010, 03:38 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Logically I would say that if you're going to use virtual interfaces then you can set an IP on each one of them. As far as I know the router doesn't understand DNS names like tomcat.domain.com but only gets IP requests, so using a correct DNS setup would do the trick. If you don't have a DNS server then you can edit the hosts file on each machine to make the link between a domain/hostname and the IP you assign to it.

If those websites are accessible from the outside world (internet) then you might consider a reverse proxy like Squid. In using that you just route all webtraffic from your router to the IP where Squid is and the proxy will connect to the correct server based on domain name.

Hope that helps you out some.

Kind regards,

Eric
 
  


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
apache2 setup/test subdomains on LAN DeltaXFX Linux - Server 5 11-04-2007 10:16 AM
subdomains tommytomato Ubuntu 9 06-20-2007 07:30 AM
Please help with subdomains (DNS) Bzz Linux - Networking 11 12-11-2006 12:18 PM
Subdomains tommytomato Linux - Newbie 5 02-04-2004 09:48 AM
Subdomains papaj Linux - General 7 04-26-2003 04:19 PM

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

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