LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-27-2007, 08:20 AM   #1
stiffy
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
Routing http request?


I have a small router/server running Slackware 11 with dnsmasq/iptables for the routing, and hostapd for wireless ap purposes. It's at the same time my very own email server.

I want to set it up with squirrelmail so that I can access my mail from the web, and another machine behind the router to serve my webpage.

I've registered a domain name, let's call it homeserver.com.

What i want is for the server to redirect a web browser request to www.homeserver.com to the machine hosting my webpage(OS X 10.4 w/apache), and mail.homeserver.com to the server itself, running squirrelmail. Can this be done?

In advance, thanks!
 
Old 02-27-2007, 08:35 AM   #2
acid_kewpie
Moderator
 
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
check our mod_proxy on apache, the proxypass and reverseproxypass attributes in particular.
 
Old 02-27-2007, 09:38 AM   #3
stiffy
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Hmm

I will look into it. I thought this had to be resolved by some dns magic, but then again, I'm somewhat new to all this..

In fact, i hoped this could be resolved by dns, as i would then be able to ssh directly into the web hosting machine.. Well!

Last edited by stiffy; 02-27-2007 at 09:40 AM.
 
Old 02-27-2007, 12:02 PM   #4
stiffy
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
OK, it seems like this will work for http requests. But, as I somewhat stated in my last post, I want every request routed according to hostname. This, I guess, can only be done using DNS, right?
Sorry for asking all these questions, but i figured this was the place to look for answers!
 
Old 02-27-2007, 12:18 PM   #5
acid_kewpie
Moderator
 
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
hostnames only exist within a few protocols, like http. other protocols have no concept of a hostname once said hostname has been converted to anip address by the client.
 
Old 02-27-2007, 12:22 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
You can route requests for www to one IP address and mail to another, but having said that, chances are very good that you only have one public IP address. In that case, the IP for www and mail would have to be the same to the internet.

If you happen to have multiple real world IP addresses, then you can do it with DNS alone. You can also set up an internal DNS, but that won't help your ability to reach either box from the outside world.

Peace,
JimBass
 
Old 02-27-2007, 04:31 PM   #7
stiffy
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, everyone. And you're right, JimBass, I only have one public IP. Seems like modproxy is the way to go!
 
  


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
Printing out http request in php abrb220 Programming 1 11-19-2005 02:23 AM
http request mkamyar Linux - Software 5 08-30-2005 02:30 AM
HTTP::Request and CPAN support amer_58 Linux - Newbie 2 03-30-2005 11:46 AM
Authentication In A Http Request With Kerberos Ephraim Programming 0 08-03-2004 04:13 AM
HTTP request parsing: POST mofofish Programming 3 12-05-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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