LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-23-2002, 05:38 PM   #1
jmnovak
LQ Newbie
 
Registered: Feb 2002
Posts: 15

Rep: Reputation: 0
Question Apache Question


Hi!

I am a Linux newbie...I currently am using Apache 1.3.19 on SuSe 7.0.

I'm not too sure on what it is called in the Linux/Apache world but I will give you the scenario.

Currently my company is forwarding all http requests to myserver.mycompanydomain.com. I currently also have my own private domain, which say is myserver.mydomain.com, which all requests are going to the same machine.

I would like to direct (or redirect, if that's what it's called) all requests from http://myserver.mycompanydomain.com, to my private domain, that is also on the same machine but controlled by another version of Apache, that is listening for another port, to, let's say, http://myserver.mydomain.com:8005.

Anyone know if it is the httpd.conf file that controls this or do I have to get BIND involved, which I would prefer to avoid.

I really appreciate your help in advance!

Best Regards,

Jason
 
Old 04-23-2002, 07:56 PM   #2
FunkFlex
Member
 
Registered: Jan 2002
Location: UK
Distribution: Redhat 7.2
Posts: 35

Rep: Reputation: 15
before you start redirecting to http://a.b.c:8005

have you looked into Apache name-based webservers..
where you can setup many virtual hosts with different names/domain names but still using one IP address and listening on the same port 80.

Or do you actually want to forward/redirect it to another port?
 
Old 04-23-2002, 08:32 PM   #3
jmnovak
LQ Newbie
 
Registered: Feb 2002
Posts: 15

Original Poster
Rep: Reputation: 0
Hi!

Thanks for your reply! Actually, I just want to forward it to another port.

Thanks again for your help!

Best Regards,

Jason
 
Old 04-24-2002, 07:54 PM   #4
Norel
Member
 
Registered: Apr 2002
Location: Italy
Distribution: RockLinux
Posts: 35

Rep: Reputation: 15
Re: Apache Question

Quote:
Originally posted by jmnovak
...
I would like to direct (or redirect, if that's what it's called) all requests from http://myserver.mycompanydomain.com, to my private domain, that is also on the same machine but controlled by another version of Apache, that is listening for another port, to, let's say, http://myserver.mydomain.com:8005.
...
If I can understand what you say:
- you have only 1 machine (IP 1.2.3.4)
- you want redirect any connection to port 80 from that machine to itself to port 8005
If it's right you just need DNAT (http://netfilter.samba.org/unreliabl....linuxdoc.html):
iptables -t nat -A PREROUTING -i lo+ -p tcp --dport 80 -j DNAT --to-port 8005
iptables -t nat -A PREROUTING -d 1.2.3.4 -s 1.2.3.4 -p tcp --dport 80 -j DNAT --to-port 8005

If your intention is to redirect to port 8005 any connection to server named myserver.mydomain.com I _strongly_ suggest virtual host as from previus post.
 
  


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
Question - (apache?) pylon42 Linux - General 7 03-23-2005 07:55 AM
Apache Question Sideshow Linux - Networking 6 02-13-2004 05:31 PM
another apache question peteABK Linux - Software 8 05-27-2003 02:58 AM
Apache question plisken Linux - Software 1 02-25-2003 02:40 PM
apache question davsingl67 Linux - Newbie 1 12-11-2002 02:04 PM

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

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