LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-28-2013, 10:55 PM   #1
urssandip
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
URL Redirection not happening with Apache Reverse Proxy in RHEL6


Hi Experts,

I'm trying to configure my Apache in RHEL6 as a Reverse Proxy. I configured my Reverse Proxy (RP) to forward the request to the Internel Webserver.

Client ---> Reverse Proxy (https://proxy.net.test)----> Internal Web Server (https://internal.net.test)
Reverse Proxy - 172.31.5.x
Internal Web Server - 10.18.2.x

When users are browsing https://proxy.net.test, he/she actually being redirected to https://internal.net.test. This is working fine with the below configuration in /etc/httpd/conf/httpd.conf in my Proxy server:
-------------------------------
Listen 172.31.5.42:80
ProxyPreserveHost On
ProxyRequests off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
SSLProxyEngine On
RequestHeader set Front-End-Https "On"
ProxyPass / https://internal.net.test/
ProxyPassReverse / https://internal.net.test/
-------------------------------

Now I'm stuck when I'm trying to acheive the below thing:

Users will access https://proxy.net.test/dsview and he/she will be redirected to https://internal.net.test/

Everytime I try to access, I end up with the below error:

[Thu Feb 28 18:55:11 2013] [error] [client 172.31.3.x] File does not exist: /var/www/html/dsview

The confguration what I put in httpd.conf in Proxy Server is (after googling for 2 days):

--------------------------------------------------
ProxyRequests Off

# Redirect HTTP requests to HTTPS
<VirtualHost 172.31.5.x:80>
ServerName proxy.net.test
ServerAlias proxy.net.test
Redirect / https://proxy.net.test/
</VirtualHost>

<VirtualHost 172.31.5.x:443>
ServerName proxy.net.test
ServerAlias proxy.net.test
ErrorLog /var/log/httpd/dsview_error_log
TransferLog /var/log/httpd/dsview_access_log
ProxyPreserveHost On
ProxyPass /dsview/ https://internal.net.test/
ProxyPassReverse /dsview/ https://internal.net.test/
SSLEngine On
SSLProxyEngine On
RequestHeader set Front-End-Https "On"
SSLCertificateFile /etc/pki/tls/certs/proxy
SSLCertificateKeyFile /etc/pki/tls/private/proxy
</VirtualHost>
--------------------------------------------------
Firewall port 80 and 443 is open between proxy and internal web server.
I've the below hosts file entry in Proxy server:

172.31.5.x proxy.net.itc proxy
10.18.2.x internal.net.test


Please note self signed certificate is also generated and working properly.

When I'm accessing https://proxy.net.itc/dsview, it is not redirecting at all and ending up with : 404 File not found
and error log showing: [Thu Feb 28 18:55:11 2013] [error] [client 172.31.3.x] File does not exist: /var/www/html/dsview

I'm completely stuck here. Any suggestion will be of great help.

Thanks in advance.
 
Old 03-01-2013, 07:12 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
you are requesting "/dsview" but redirecting "/dsview" these are NOT the same thing! remove the end slash from the ProxyPass directive.
 
Old 03-11-2013, 02:27 AM   #3
urssandip
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I have removed the slash from the ProxyPass directive. No page is coming at all.

Please help.
 
  


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 URL redirection linux1986 Linux - Server 1 05-10-2012 07:15 AM
Apache2, reverse proxy, original URL inkeri Linux - Server 9 10-11-2011 04:56 PM
[SOLVED] URL redirection or reverse proxy? vbekker Linux - Software 3 12-28-2010 03:37 PM
[SOLVED] URL redirection problem in a reverse proxy apache2 environment on Lenny with Xen tkmsr Linux - Server 10 04-30-2010 01:42 AM
Apache Vhost with reverse proxy and redirection volga629 Linux - Server 3 01-13-2010 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:15 AM.

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