0

I am trying to setup my nginx.conf file with the following locations in order to show Jenkins (https://jenkins.io/index.html) and Eureka (https://github.com/Netflix/eureka).

The below configuration doesn't show JS and CSS files.

Any idea on how to set it up?

       location /jenkins {
                     include /etc/nginx/mime.types;
                     proxy_pass_request_headers on;
                     proxy_set_header        Host $host:$server_port;
                     proxy_set_header        X-Real-IP $remote_addr;
                     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                     proxy_set_header        X-Forwarded-Proto $scheme;
                     proxy_pass     http://127.0.0.1:8080;
                     rewrite ^/jenkins(.*) /$1 break;
                     proxy_read_timeout  90;
                     proxy_redirect      http://127.0.0.1:8080 https://server-domain/;

             }

       location  /eureka {
                     include /etc/nginx/mime.types;
                     proxy_pass_request_headers on;
                     proxy_set_header        Host $host:$server_port;
                     proxy_set_header        X-Real-IP $remote_addr;
                     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                     proxy_set_header        X-Forwarded-Proto $scheme;
                     rewrite ^/eureka(.*) /$1 break;
                     proxy_pass     http://127.0.0.1:8761;
                     proxy_read_timeout  90;
                     proxy_redirect      http://127.0.0.1:8761 https://domain-name/eureka;
                     proxy_http_version 1.1;
                     proxy_request_buffering off;
             }
anghel adrian
  • 162
  • 2
  • 14
  • It might be more to do with your application rather than nginx, I had faced similar issue though but had I used zuul gateway, have a look at this I recently faced https://stackoverflow.com/questions/46634604/how-to-configure-angular-4-behind-proxy – Karthik Prasad Oct 11 '17 at 04:49
  • Not really helpful. It's not about my application. It's about showing 2 existing applications, Jenkins and Eureka. – anghel adrian Oct 11 '17 at 08:19

0 Answers0