Ngnix 1.12/Jenkins 2.151: It appears that your reverse proxy set up is broken












0














I am trying to configure reverse proxy for Jenkins 2.151 with nginx-1.12.2 on Centos 7.5 server. my Jenkins running on port 8080 with prefix /Jenkins. Using the below nginx configuration file when I go to manage configuration always getting It appears that your reverse proxy set up is broken. Tried several different options not able to the fix.



tried these two recommendation already, no luck



https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
NGINX/JENKINS: It appears that your reverse proxy set up is broken



Looking for some help now.



worker_processes 1;
events { worker_connections 1024; }
http {
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $upstream_addr '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 http2 ssl;
server_name jenkins-dev.test.com;
access_log /var/log/nginx/access.log compression;
error_log /var/log/nginx/error.log ;
ignore_invalid_headers off;
location ^~ /jenkins/ {
proxy_pass http://localhost:8080/jenkins/;
proxy_redirect http:// https://;
sendfile off;
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 https;
proxy_set_header X-Forwarded-Port 443;
proxy_max_temp_file_size 0;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_temp_file_write_size 64k;
proxy_http_version 1.1;
proxy_request_buffering off;
}
ssl on;
ssl_stapling on;
ssl_stapling_verify on;
ssl_certificate /etc/pki/tls/certs/server.crt;
ssl_certificate_key /etc/pki/tls/certs/server.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:20m;
ssl_session_tickets off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'HIGH:AES-GCM:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:!SSLv3:!SSLv2:!EXPORT:!DH:!DES:!3DES:!MD5:!DHE:!ADH:!EDH';
ssl_ecdh_curve secp384r1;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
}
}


thank
SR










share|improve this question





























    0














    I am trying to configure reverse proxy for Jenkins 2.151 with nginx-1.12.2 on Centos 7.5 server. my Jenkins running on port 8080 with prefix /Jenkins. Using the below nginx configuration file when I go to manage configuration always getting It appears that your reverse proxy set up is broken. Tried several different options not able to the fix.



    tried these two recommendation already, no luck



    https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
    NGINX/JENKINS: It appears that your reverse proxy set up is broken



    Looking for some help now.



    worker_processes 1;
    events { worker_connections 1024; }
    http {
    log_format compression '$remote_addr - $remote_user [$time_local] '
    '"$request" $status $upstream_addr '
    '"$http_referer" "$http_user_agent" "$gzip_ratio"';
    server {
    listen 80 default_server;
    server_name _;
    return 301 https://$host$request_uri;
    }
    server {
    listen 443 http2 ssl;
    server_name jenkins-dev.test.com;
    access_log /var/log/nginx/access.log compression;
    error_log /var/log/nginx/error.log ;
    ignore_invalid_headers off;
    location ^~ /jenkins/ {
    proxy_pass http://localhost:8080/jenkins/;
    proxy_redirect http:// https://;
    sendfile off;
    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 https;
    proxy_set_header X-Forwarded-Port 443;
    proxy_max_temp_file_size 0;
    client_max_body_size 10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_temp_file_write_size 64k;
    proxy_http_version 1.1;
    proxy_request_buffering off;
    }
    ssl on;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_certificate /etc/pki/tls/certs/server.crt;
    ssl_certificate_key /etc/pki/tls/certs/server.key;
    ssl_session_timeout 5m;
    ssl_session_cache shared:SSL:20m;
    ssl_session_tickets off;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'HIGH:AES-GCM:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:!SSLv3:!SSLv2:!EXPORT:!DH:!DES:!3DES:!MD5:!DHE:!ADH:!EDH';
    ssl_ecdh_curve secp384r1;
    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    }
    }


    thank
    SR










    share|improve this question



























      0












      0








      0







      I am trying to configure reverse proxy for Jenkins 2.151 with nginx-1.12.2 on Centos 7.5 server. my Jenkins running on port 8080 with prefix /Jenkins. Using the below nginx configuration file when I go to manage configuration always getting It appears that your reverse proxy set up is broken. Tried several different options not able to the fix.



      tried these two recommendation already, no luck



      https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
      NGINX/JENKINS: It appears that your reverse proxy set up is broken



      Looking for some help now.



      worker_processes 1;
      events { worker_connections 1024; }
      http {
      log_format compression '$remote_addr - $remote_user [$time_local] '
      '"$request" $status $upstream_addr '
      '"$http_referer" "$http_user_agent" "$gzip_ratio"';
      server {
      listen 80 default_server;
      server_name _;
      return 301 https://$host$request_uri;
      }
      server {
      listen 443 http2 ssl;
      server_name jenkins-dev.test.com;
      access_log /var/log/nginx/access.log compression;
      error_log /var/log/nginx/error.log ;
      ignore_invalid_headers off;
      location ^~ /jenkins/ {
      proxy_pass http://localhost:8080/jenkins/;
      proxy_redirect http:// https://;
      sendfile off;
      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 https;
      proxy_set_header X-Forwarded-Port 443;
      proxy_max_temp_file_size 0;
      client_max_body_size 10m;
      client_body_buffer_size 128k;
      proxy_connect_timeout 90;
      proxy_send_timeout 90;
      proxy_read_timeout 90;
      proxy_temp_file_write_size 64k;
      proxy_http_version 1.1;
      proxy_request_buffering off;
      }
      ssl on;
      ssl_stapling on;
      ssl_stapling_verify on;
      ssl_certificate /etc/pki/tls/certs/server.crt;
      ssl_certificate_key /etc/pki/tls/certs/server.key;
      ssl_session_timeout 5m;
      ssl_session_cache shared:SSL:20m;
      ssl_session_tickets off;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_prefer_server_ciphers on;
      ssl_ciphers 'HIGH:AES-GCM:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:!SSLv3:!SSLv2:!EXPORT:!DH:!DES:!3DES:!MD5:!DHE:!ADH:!EDH';
      ssl_ecdh_curve secp384r1;
      add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
      add_header X-Frame-Options DENY;
      add_header X-Content-Type-Options nosniff;
      }
      }


      thank
      SR










      share|improve this question















      I am trying to configure reverse proxy for Jenkins 2.151 with nginx-1.12.2 on Centos 7.5 server. my Jenkins running on port 8080 with prefix /Jenkins. Using the below nginx configuration file when I go to manage configuration always getting It appears that your reverse proxy set up is broken. Tried several different options not able to the fix.



      tried these two recommendation already, no luck



      https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
      NGINX/JENKINS: It appears that your reverse proxy set up is broken



      Looking for some help now.



      worker_processes 1;
      events { worker_connections 1024; }
      http {
      log_format compression '$remote_addr - $remote_user [$time_local] '
      '"$request" $status $upstream_addr '
      '"$http_referer" "$http_user_agent" "$gzip_ratio"';
      server {
      listen 80 default_server;
      server_name _;
      return 301 https://$host$request_uri;
      }
      server {
      listen 443 http2 ssl;
      server_name jenkins-dev.test.com;
      access_log /var/log/nginx/access.log compression;
      error_log /var/log/nginx/error.log ;
      ignore_invalid_headers off;
      location ^~ /jenkins/ {
      proxy_pass http://localhost:8080/jenkins/;
      proxy_redirect http:// https://;
      sendfile off;
      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 https;
      proxy_set_header X-Forwarded-Port 443;
      proxy_max_temp_file_size 0;
      client_max_body_size 10m;
      client_body_buffer_size 128k;
      proxy_connect_timeout 90;
      proxy_send_timeout 90;
      proxy_read_timeout 90;
      proxy_temp_file_write_size 64k;
      proxy_http_version 1.1;
      proxy_request_buffering off;
      }
      ssl on;
      ssl_stapling on;
      ssl_stapling_verify on;
      ssl_certificate /etc/pki/tls/certs/server.crt;
      ssl_certificate_key /etc/pki/tls/certs/server.key;
      ssl_session_timeout 5m;
      ssl_session_cache shared:SSL:20m;
      ssl_session_tickets off;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_prefer_server_ciphers on;
      ssl_ciphers 'HIGH:AES-GCM:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:!SSLv3:!SSLv2:!EXPORT:!DH:!DES:!3DES:!MD5:!DHE:!ADH:!EDH';
      ssl_ecdh_curve secp384r1;
      add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
      add_header X-Frame-Options DENY;
      add_header X-Content-Type-Options nosniff;
      }
      }


      thank
      SR







      nginx jenkins nginx-reverse-proxy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 '18 at 18:23

























      asked Nov 12 '18 at 16:47









      sfgroups

      5,27284183




      5,27284183
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Ensure the url you use to access jenkins and the setting Jenkins URL are same.



          For ex. I access my jenkins via browser using http://example.com so I set my Jenkins URL to http://example.com. If you set it to http://<IP_address> for example you will see the error you are reporting.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266612%2fngnix-1-12-jenkins-2-151-it-appears-that-your-reverse-proxy-set-up-is-broken%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ensure the url you use to access jenkins and the setting Jenkins URL are same.



            For ex. I access my jenkins via browser using http://example.com so I set my Jenkins URL to http://example.com. If you set it to http://<IP_address> for example you will see the error you are reporting.






            share|improve this answer


























              0














              Ensure the url you use to access jenkins and the setting Jenkins URL are same.



              For ex. I access my jenkins via browser using http://example.com so I set my Jenkins URL to http://example.com. If you set it to http://<IP_address> for example you will see the error you are reporting.






              share|improve this answer
























                0












                0








                0






                Ensure the url you use to access jenkins and the setting Jenkins URL are same.



                For ex. I access my jenkins via browser using http://example.com so I set my Jenkins URL to http://example.com. If you set it to http://<IP_address> for example you will see the error you are reporting.






                share|improve this answer












                Ensure the url you use to access jenkins and the setting Jenkins URL are same.



                For ex. I access my jenkins via browser using http://example.com so I set my Jenkins URL to http://example.com. If you set it to http://<IP_address> for example you will see the error you are reporting.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 '18 at 23:54









                ben5556

                1,8391310




                1,8391310






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266612%2fngnix-1-12-jenkins-2-151-it-appears-that-your-reverse-proxy-set-up-is-broken%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Xamarin.form Move up view when keyboard appear

                    Post-Redirect-Get with Spring WebFlux and Thymeleaf

                    Anylogic : not able to use stopDelay()