logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod.rewrite proxy to forward from domain1 to domain2
Author
nicoven



Joined: 30 Sep 2016
Posts: 1

PostPosted: Fri 30 Sep '16 11:20    Post subject: mod.rewrite proxy to forward from domain1 to domain2 Reply with quote

Dear all,

We have a company portal that contains links to various application and webservers.

One of these links redirects to a server that we need to enable proxy on our web browser to pass through and authenticate.

The proxy server is Apache 2.2 in Windows 2008. It is just acting as a proxy and no VIRTUAL HOST is configured.

As I am very very new to Apache I would appreciate your help to achieve the following:

I want every request that comes from portal.example.com to be forwarded to browse.example.com

To get this done I was thinking to :

1. remove the # from LoadModule rewrite_module modules/mod_rewrite.so to enable the rewrite module. I hope no other action needed to enable it.

2. Add something like the following in my httpd.conf file:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond %{HTTP_HOST} ^portal.example.com$
RewriteRule ^(.*)$ browse.example.com/$1 [P,L]

</IfModule>


Can you please assist on this and amend the above code, as i am not confident that it will do the job?
You can propose your own ways if you think so.

I am attaching a very small part of the current httpd.conf hereby for your reference.

Thanking you in advance

----------------------------------------------------------------------------------------------------------
<IfModule mod_proxy.c>

ProxyRequests On
AllowCONNECT 443 49171

<proxy *>
Order deny,allow
Allow from 10.10

</Proxy>

AllowCONNECT 443 49171
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 11 Oct '16 21:27    Post subject: Reply with quote

You better use mod_proxy to connect to the backend server.
Back to top


Reply to topic   Topic: mod.rewrite proxy to forward from domain1 to domain2 View previous topic :: View next topic
Post new topic   Forum Index -> Apache