Current configuration in my vhosts file.

This is not in a location or directory block.  It is in the normal virtualhost 
block
I want my first rewriterule setup so that a user can type in 
https://myserver.mydomain.com/ and it will rewrite that to the full URL for the 
internal server.
i.e.  https://myserver.mydomain.com/ becomes 
https://myserver.mydomain.com/dir1/dir2/login.jspx

The second rewriterule is for proxying to the internal server through a 
firewall.
i.e. https://myserver.mydomain.com/dir1/dir2/login.jspx gets proxied to 
http://internalserver.mydomain.com:port#/dir1/dir2/login.jspx

then I think I need ProxyReversePass to get traffic back to the client.
Here are the lines from my current config......What am I missing here ?

RewriteRule ^/$ https://myserver.mydomain.com/dir1/dir2/login.jspx [R,L]
RewriteRule ^/dir1/dir2/(.*) 
http://internalserver.mydomain.com:port#/dir1/dir2/$1 [P]
ProxyPassReverse /dir1/dir2/ http://internalserver.mydomain.com:port#/dir1/dir2/

If it makes a difference the internal server is running Oracle SOA stack.
Again.  I can go directly to the Oracle SOA server with a browser and it works 
fine so I know the application is providing a login page and I also know my 
firewall rule is good because I run a web browser on the proxy server in the 
DMZ and go direct to the page and I get a login.

Any help would be greatly appreciated.
Starting to get pretty frustrating........

Scott
From: Riggen, Scott [mailto:scott.rig...@escocorp.com]
Sent: Friday, February 07, 2014 11:12 AM
To: users@httpd.apache.org
Subject: [users@httpd] RE: Having issues trying to use 
rewriterule,proxypass,proxyreversepass

Well.  A couple of days now and still no closer to making this work.
I'm sure I am missing something obvious.  Time to pour over all the apache docs 
line by line since I have not found anything relevant via google or bing.
Or maybe switch to another web server other than apache......

Scott

From: Riggen, Scott [mailto:scott.rig...@escocorp.com]
Sent: Wednesday, February 05, 2014 2:25 PM
To: users@httpd.apache.org<mailto:users@httpd.apache.org>
Subject: [users@httpd] Having issues trying to use 
rewriterule,proxypass,proxyreversepass

Apache info.
#apachectl -version
Server version: Apache/2.2.22 (Unix)

OS: Sles 11 64bit SP2

Modules compiled in.
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_filter.c
  mod_log_config.c
  mod_headers.c
  mod_unique_id.c
  mod_setenvif.c
  mod_version.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_proxy_scgi.c
  mod_proxy_ajp.c
  mod_proxy_balancer.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_dir.c
  mod_rewrite.c
  mod_so.c

Using apache as a reverse proxy server in a DMZ.

I have external address.
https://myserver.domain.com setup to answer connections (and that is working 
fine)
I need to rewrite and proxy/reverseproxy  that to an internal http server 
through a firewall.
Something like http://internalserver.domain.com:port#/dir/login.jspx

>From my internal network I can go straight to 
>http://internalserver.domain.com:port#/dir/login.jspx and I get a login page 
>but I also get back some additional stuff in the http line.
Something like 
http://internalserver.domain.com:port#/dir/login.jspx?_afrLoop=678802396079181&_afrWindowMode=0&_adf.ctrl-state=lunbexpzu_4

I can also start a browser on the linux server in the DMZ and go to 
http://internalserver.domain.com:port#/dir/login.jspx<http://internalserver.domain.com:7011/dir/login.jspx>
 and I get a login page so I know my firewall rules are ok.

I just cannot seem to find the correct combination of rewriterule, proxypass, 
proxyreversepass to make this work.

Any assistance will be appreciated.

Regards,

Scott

Reply via email to