Welcome! Log In Create A New Profile

Advanced

Re: Reverse proxy to Tomcat 8

Francis Daly
July 19, 2020 04:20AM
On Sat, Jul 18, 2020 at 01:18:22PM +0000, Dino Edwards wrote:

Hi there,

> Trying to reverse proxy using Nginx to a tomcat 8 application listening on port 8443 but I'm running into an issue where I'm getting status 404 on all static content.

What request do you make? (Probably something like /file.jpg, or
/ciphermail/file.jpg? Give one specific example.)

What response do you get? (You said 404. Do the nginx-or-upstream logs
give any further information?)

What response do you want instead? (This might be "the content of
/usr/local/nginx/html/ciphermail/file.jpg", or "the response from
proxy_pass to https://localhost:8443/ciphermail/file.jpg", or something
else -- be specific,for the example that you gave in the first answer.)

> Below is my config file. The /admin location works with no problems. The /ciphermail is the problematic one. I had the exact same problem with static content with the /admin location until I added the following in my server block:
>
> location ~* \.(jpg|jpeg|png|gif|ico|css|js)$
>
> and then it started working. However, the /ciphermail location seems to still not work.

> location /ciphermail {

Depending on what you want, it might be that you should have "^~" before
and "/" after the word "/ciphermail" in the "location" definition.

Or it might be something else.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy to Tomcat 8

deeztek July 18, 2020 09:20AM

Re: Reverse proxy to Tomcat 8

Francis Daly July 19, 2020 04:20AM

RE: Reverse proxy to Tomcat 8

deeztek July 19, 2020 07:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready