-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Edwin,

On 12/28/16 5:09 PM, Edwin Quijada wrote:
> Hi!
> 
> I have a problem with apache + Tomcat. I am trying to put apache
> in front of Tomcat to access my app but I am getting an error 404.
> 
> I have 2 virtual servers in apache for 2 DNS with 2 tomcats
> 
> This is one of my virtual server
> 
> <VirtualHost *:80> ServerName    server1.org ServerAlias
> *.server1.org ServerAdmin webmaster@localhost DocumentRoot
> /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog
> ${APACHE_LOG_DIR}/access.log combined #ProxyPreserveHost On
> 
> ProxyRequests off ProxyPreserveHost On # Servers to proxy the
> connection, or # List of application servers Usage ProxyPass /
> http://localhost:8082/jq ProxyPassReverse /
> http://localhost:8082/jq </VirtualHost>
> 
> The problem is when I access the site http://server1.org should be
>  go to http://localhost:8082/jq but instead it goes to 
> http://localhost:8082/jq/jq and obvious I get an error 404.
> 
> My problem is I dont know why it duplicates the jq suffix if I go
> to http://ipserver1:8082/jq there is no problem.
> 
> I check the error.log from apache and there is nothing to see.
> 
> Any help or any clues will be appreciated.
> 
> 
> 
> This is the output when I do http://server1.org Estado HTTP 404 -
> /jqjq/
> 
> type Informe de estado
> 
> mensaje /jqjq/
> 
> descripción El recurso requerido no está disponible.

If you map / -> /jq, then any request for / will be mapped to /jq/jq,
just as you requested.

In my opinion, mapping / to /jq is going to cause you an awful lot of
headaches. It is better to map / -> / or /jq -> /jq.

Try this:

   ProxyPass /jq        http://localhost:8082/jq
   ProxyPassReverse /jq http://localhost:8082/jq

Then make a request to http://server1.org/jq/ and see if you get
better results.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYZawYAAoJEBzwKT+lPKRYLeUP/A6LQD1rp1p1kHtS0p/kfaim
/+mca/JOm4Ra1sBO+7PBWW+feD4mQdIYWkkFnsGpebAQOdNO1RDysQZwG+Lyi5Gl
S5ZoFShi/WmtExPcH8MXWhL2oM19yqufiinwGnKRbnuk+A9MvOGuRMPgwbo8dMxG
J7aSB0rBNcpSuW4ohvM0tISOhgRgAL97pxBSU/OV5amui/pyW9NZ1blmpPwVZn7v
b9MNYkwORZTqThcM/B6fm0JFpFySawcOLfiK7tEj/S0b1fnbN9IHIqmDPt2qWa2m
x7SnFHQEjLKMuTcReZy9mbuolWQ5yXjF3bd9A8ItHOLeE2k/hABbL6pvOE9LBTw8
UgCm6MEpcWgtSH0AuiduUhcVA3S3W+6tA+hZpjidqybH0rFOyI0OeDMDdKnwMzMd
NRxk220Jw91YACI3UDmSCZwFoGCyMxcZMnFfBVyxC9VcYhNNkP7fmEVncpnKI87w
qHGH37qmgsb5wrHco5GKag2cJbTc8+PcNVxR1KIF/u/P/mGR5NF5dMsvjUrerrRW
l6re/ZIeS6ti5ZwTcLsyEpqwmXQAAHJe/tSD/npO13ZcAvR5ZUByPPF93LIsBMQA
obrYzF6HSPUklF1XgZPGGoUipaVMGJSAaeaw0WwiBcItCF5lPK4NF24G57F7drB0
pUyO30kR4MEzbAscq39V
=zzjr
-----END PGP SIGNATURE-----

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

Reply via email to