tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Mod_jk Configuration
Date Sun, 25 Jan 2015 22:18:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 1/23/15 7:49 PM, Chris Arnold wrote:
> 
>> *sigh*
>> 
>> If you only want to proxy for one VirtualHost, then only set up 
>> JkMounts in that one VirtualHost.
>> 
>> Like this:
>> 
>> <VirtualHost *:80> ServerName share2.xxxx.xxx
>> 
>> JkMount /* worker1 (or "balancer", whichever you want) 
>> </VirtualHost>
> 
> Maybe I wasn't clear in my other reply, the above jkmount /*
> worker1 sends all requests to the tomcat app. So a request to
> http://domain.tld would get you to the tomcat app (not what we
> want)

Then your virtual hosts are not set up correctly. If you have a
VirtualHost for share2.xxx.xxx and a separate VirtualHost for xxxx.xxx
then the settings should not bleed across.

>> If you want to map / to /share it's a giant pain in the neck and
>> I don't think you will actually be able to accomplish. Best to
>> proxy /share to /share, or, better yet, re-name your application
>> to ROOT.war and proxy "/" to "/".
> 
> Renaming the war would, I believe, will break everything.

Why?

>> You should not have needed to change workers.properties.
> 
> Maybe not but u doing so, I have eliminated all the extra clutter
> in workers.properties as being the problem
>> 
>>> and the vhost:
>>> 
>>> JkMount /share2/* worker1 but this gives a 404 *sigh*:
>> 
>> For what URL?
> 
> If I understand your question, https://share2.domain.tld. I found 
> that the /share2/* part of jkmount /share2/* worker1 should be
> just /share/*. Changed to just /share/* and now
> https://share2.domain.tld takes you to the root (/srv/www/hotdogs)
> and that is not even where our sites are hosted
> (/srv/www/htdocs/sites).

Then your DocumentRoot is not set correctly. I highly recommend that
you have an expert take a look at your httpd configuration... it
sounds severely mis-configured.

> However, if I put a port 80 redirect to port 443 in the vhost and
> go to http://share2.domain.tld, that gets me to the correct tomcat
> app (https://share2.domain.tld/share)
> 
>> Don't mess with the Tomcat configuration. Basically, stop
>> touching things.
> 
> My replies have not alluded to any messing with tomcat config.
>> 
>> What URL can you use to get to the application *without* httpd in
>> the middle?
> 
> https://share2.domain.tld:8443/share
> 
> You can see why we need users to be able to type share2.domain.tld 
> and arrive at the tomcat app. If you contact me off list I will be 
> happy to give you the complete url so you can see exactly the
> address that is need to get to. I don't want that info on a
> publicly index mailing list.

If you won't re-name the web application, I think redirects will be
your best bet. If a client requests http(s)://share2.domain.tld/, you
should redirect them to https://share2.domain.tld/share/ and then
"JkMount /share/* worker1". You can redirect using RedirectPermanant
or a few other things like having an index.html with an HTTP-EQUIV
header in it.

At this point, you seem to be able to successfully connect httpd ->
Tomcat. If you don't want to follow our advice for a more robust
configuration, you don't have to.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUxWvNAAoJEBzwKT+lPKRYq/8QAMqpMDnEtqvY6irKXI+vCBs9
ZHfVw/93bflr91yc1tN3/EKVFQDLu9qlvkMX+AbG72u4nHRlcq/rtWQbkSA+X3W7
+2Pdx6CXHbYcbGjxN0Z60OZs9GWuWmQ6Fwm/pz70ZKEhsaRfEzUgdsdpY9eR9IKd
Rdczw75EJara2jJfFQE9zs24g0I7N2nL+xTL2EMz5VzUyGRiiJnFCat2CPsw0QJU
broRMy5leXfi5MQFR58BhPT6GZVFS5xP83RlJzlcCanIipCh6oWI8aKJ2ZJNvslY
bJJAzem0JJ0U9exx+5wGKoKMUAC3XFeCWaB1anuVBmHJkQ/TSEcBM8HdwdGIlMu6
LemtQ5vj8ECfiCJnjVLR7AW+zRNwRM5dSVyMpcEYHz3jkzxZf2wMuEoihdkKEVC4
B95PqVkEC8qTCEPOCIupaod+HsJnl6F2Am8dWpjlWO0u2v0bVaFhs/3ss4yivNq7
F1YR5yh3Jkk2xtcsBx5wx4uwlPfdRtIDtHzTkE0SYPs3yobq+T3x5KdNVX0oZh/Q
pL+1sDwnixKA4rFbzscXxVxJ1P/4keYQbHamsQnyENpXyWJYCUQaKLCoY3aftNz2
HlKMlsNb4DFF9ZnClPes+SikCJPtnVgS6ckZKc00m0kc9L4tlcgged5AMANpwT8r
cApDaCCt2V1FXBUWJ2Pc
=Yqys
-----END PGP SIGNATURE-----

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


Mime
View raw message