LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-20-2005, 12:53 PM   #1
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Rep: Reputation: 1
How2 let apache2 forward the request to another web-server on another machine


Hi,

I'm looking for a way to do the following:

I have apache2 running with virtual hosting.
I'm accessing all my sites from the internet.

When I access A.x.nu it takes me to the A part on my server
When I access B.x.nu it takes me to the B part on my server

Now, when I access C.x.nu I don't wat to access C on this server, but I want to forward the request to another server (my dreambox).

This way I want my dreambox available from the outside on the same port (port 80) as all the other sites are.

Regards
 
Old 11-20-2005, 04:33 PM   #2
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Original Poster
Rep: Reputation: 1
Helped myself:

use the reverse proxy functionality of apache2!

Damn that works nice!!!
 
Old 11-30-2005, 04:10 PM   #3
ArlinOrlando
LQ Newbie
 
Registered: Nov 2005
Location: Brazil
Distribution: Fedora Core 4
Posts: 3

Rep: Reputation: 0
Hi boomy,

I did the same thing.. but I still have a problem... Now all the requests comes with the apache proxy IP... So, I'm unable to detect users IPs...

Do you know how to also foward the user IP's ?

Thanks,
Arlin
 
Old 11-30-2005, 06:45 PM   #4
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Original Poster
Rep: Reputation: 1
Quote:
Originally posted by ArlinOrlando

Do you know how to also foward the user IP's ?
Hmmm, I don't know if the source IP addresses are sent through.
I will check this tomorrow... euh, later this day and let you know.
 
Old 11-30-2005, 07:28 PM   #5
teddymills
LQ Newbie
 
Registered: Jun 2004
Location: The Far side of Charon
Posts: 15

Rep: Reputation: 0
Apache Redirection

I never learned how to do the Apache redirection.
What I did was a clumsy but it works.

I just made another Apache web server on another machine, and used
port 81, 8080 or whatever seemed reasonable.

However in the future, I would like to learn the Apache redirection/rewrite rules.
 
Old 12-01-2005, 02:05 PM   #6
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Original Poster
Rep: Reputation: 1
If you don't want to read the whole thing and like to get started, this is what you have to do, it's not detailed:

A configuration of your virtual host site:
put this in apache2/sites-enabled
<VirtualHost <ip address if your outgoing ethernet card:80>
# Basic setup
ServerAdmin <your email adres>
ServerAlias testsite.site.com
Servername testsite.site.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://<the ip address that your other server has>:80/
ProxyPassReverse / http://<the ip address that your other server has>:80/
</VirtualHost>


Hope it gives you a start, but make sure that you know what you do, for minimal: read the commands at apache's site
 
Old 12-01-2005, 02:17 PM   #7
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Original Poster
Rep: Reputation: 1
ArlinOrlando,

What I snooped from the interface, and (Duhh) I could told you that directly, is that it is not possible that the request comes from the client.

Why would you like to have that?
 
Old 12-01-2005, 08:25 PM   #8
ArlinOrlando
LQ Newbie
 
Registered: Nov 2005
Location: Brazil
Distribution: Fedora Core 4
Posts: 3

Rep: Reputation: 0
The problem is that I what to identify the clients IP's ... Because Im using phpnuke with sentinel to protect against hackers attacks, and one of the defences is a autoblock attackers IPs...
 
Old 12-02-2005, 02:27 PM   #9
boomy
LQ Newbie
 
Registered: Nov 2005
Location: Netherlands
Posts: 14

Original Poster
Rep: Reputation: 1
I asume that you can't install this phpnuke at your apache proxy?
Unfortunatly I can't help you further. But I hope you get your answer somewhere.
 
Old 12-04-2005, 04:50 PM   #10
ArlinOrlando
LQ Newbie
 
Registered: Nov 2005
Location: Brazil
Distribution: Fedora Core 4
Posts: 3

Rep: Reputation: 0
Yes, for security reasons I was avoiding to do that...
Well anyway, I will put this machine in a new link, that will solve my problem...

Thanks for the help!

Arlin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache: Forward request to another box? MasterC Linux - Networking 10 10-26-2007 05:27 PM
Configuring the tree structure of a web server with apache2?? AQG Linux - Software 7 06-30-2005 04:47 PM
Transperant Proxy and web server on one machine = issue ... sys7em Linux - Networking 2 06-16-2005 03:29 PM
Apache2, MySQL & PHP Web Server. FTP Needed! Bobson Linux - Networking 4 02-07-2005 05:25 PM
Will this machine do for a web server? TheSwine Linux - General 6 01-05-2004 08:14 PM


All times are GMT -5. The time now is 09:45 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration