3

This is very strange and I can't get my head around it. I have set up a nginx server to reverse proxy a docker container. Nginx seems to be able to server some pages, but not sub-directories, or perhaps it can't serve dynamic content. I am not entirely sure what's going on here.

For example I am trying to reverse proxy the activemq admin console as such with the following config, but it doesn't seem to be able to serve subdirectories:

server {
        listen 8162;
        server_name dockerdev1.site.com;

        ssl on;
        ssl_certificate /var/certificates/cert.com.crt;
        ssl_certificate_key /var/certificates/cert.com.key;

        ssl_session_timeout 5m;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
        ssl_prefer_server_ciphers on;


        location / {
        include  /etc/nginx/mime.types;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass https://dockerdev1.site.com:11113;
                try_files $uri $uri/ =404;

        }


}
ezra-s
  • 2,215
  • 1
  • 7
  • 13
Ulukai
  • 829
  • 2
  • 10
  • 28

1 Answers1

0

Remove the try_files $uri $uri/ =404; statement.

(Copied @RichardSmith's comment, just cleaning up unanswered queue)

kubanczyk
  • 13,502
  • 5
  • 40
  • 55