RE: Multi-URL Access 1 Webapp

2013-10-31 Thread Matt Barry
mod_rewrite is what's adding the extra /share/

RewriteRule ^/(.*) https://192.168.123.3:8443/share/$1 [P]

should be something like either:

RewriteRule ^/(.*) https://192.168.123.3:8443/$1 [P]

or:

RewriteRule ^/share/(.*) https://192.168.123.3:8443/share/$1 [P]

..depending on whether you want to proxy all URL's to Tomcat, or just the 
/share ones..

Matt

From: Chris Arnold [carn...@electrichendrix.com]
Sent: Thursday, October 31, 2013 2:16 PM
To: Tomcat Users List
Subject: Re: Multi-URL Access 1 Webapp

Starting over since i can not seem to get this to work with tomcat or apache. 
So what i have now that IS somewhat working is:

#This rewrites https://share.anydomain.tld to our mail server
RewriteEngine On
RewriteCond %{HTTP_HOST} ^share\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://192.168.123.3:8443/share/$1 [P]

This DOES get me over to the tomcat side but gives a 404. Notice the status 
line:
HTTP Status 404 - /share/share/page/
Tomcat seems to be adding an extra /share. User need to access the web app with 
https://share.anydomain.tld which will land on apache and apache will get it to 
tomcat. The web app is accessible from http://ip:8080/share or 
https://ip:8443/share. How do i stop tomcat from adding the extra share?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
The contents of this message and any attachments to it are confidential and may 
be legally privileged.
If you have received this message in error you should delete it from your 
system immediately and advise the sender.
dunnhumby may monitor and record all emails. The views expressed in this email 
are those of the sender and not those of dunnhumby.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Multi-URL Access 1 Webapp

2013-10-22 Thread Matt Barry
Hi Chris,

I didn't know you were running a 3rd-party application. Do you need
the application to behave differently given a particular client? If
not, there's nothing to do. If so, you probably need to ask the
Alfresco folks how to do that. I personally know nothing about
Alfresco, though there may be some folks on the list who do and might
reply here.

I need to revisit this issue. Here is my apache vhost:
VirtualHost *:80
ServerName share.*

You probably want to be using ServerAlias here, iirc..

#This rewrites https://share.anydomain.tld to our alfresco server
RewriteCond %{HTTP_HOST} ^share\.
RewriteCond %{HTTPS} on

Okay, I'll take a bite at the obvious.  Your vhost is running on *:80, and your 
mod_rewrite condition only triggers for https; is your httpd actually serving 
https on port 80?

RewriteRule ^/(.*) http://192.168.123.3:8080/share/$1 [P]
RedirectMatch ^/$ /share/

I sort of doubt that this combination of rewrites and redirects is going to do 
what you want.  If the RedirectMatch fires (I'm not positive it would), it 
would send a 302 to /share/, which would then get proxied to /share/share/ on 
your app server.  (This is the type of setup I typically find mod_proxy much 
easier to work with vs mod_redirect, but this is all OT for this list..)

Cheers,
Matt
The contents of this message and any attachments to it are confidential and may 
be legally privileged.
If you have received this message in error you should delete it from your 
system immediately and advise the sender.
dunnhumby may monitor and record all emails. The views expressed in this email 
are those of the sender and not those of dunnhumby.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org