Basic nginx proxy_pass fails with HTTP 500 The 2019 Stack Overflow Developer Survey Results...

Why can't devices on different VLANs, but on the same subnet, communicate?

What's the point in a preamp?

Can we generate random numbers using irrational numbers like π and e?

Do I have Disadvantage attacking with an off-hand weapon?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Student Loan from years ago pops up and is taking my salary

Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time?

Presidential Pardon

Can withdrawing asylum be illegal?

How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?

What do I do when my TA workload is more than expected?

Do working physicists consider Newtonian mechanics to be "falsified"?

Variable with quotation marks "$()"

60's-70's movie: home appliances revolting against the owners

Word to describe a time interval

University's motivation for having tenure-track positions

Can the DM override racial traits?

How do spell lists change if the party levels up without taking a long rest?

"... to apply for a visa" or "... and applied for a visa"?

Did the new image of black hole confirm the general theory of relativity?

How to type a long/em dash `—`

What can I do if neighbor is blocking my solar panels intentionally?

Am I ethically obligated to go into work on an off day if the reason is sudden?



Basic nginx proxy_pass fails with HTTP 500



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!How to make nginx reverse proxy let 503 error pages pass through to client?Blank Page: wordpress on nginx+php-fpmTrouble with nginx and serving from multiple directories under the same domainnginx returns error 500 when doing nagios checkNginx gives 504 Gateway Time-out once moved to livenginx load balancer rewrite to listen portNginx proxy_pass confignginx rewrite throw 404 with last and breaknginx configuration troubleUniversal HTTPS to HTTP reverse proxy using nginx





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I have an extremely minimal configuration that I believe should reverse proxy what I see on example.com:1234 to example.com[:80].



error_log /var/log/nginx/error.log info;

events{
}

http{
server{
listen 80;
server_name example.com;

location / {
proxy_pass http://example.com:1234;
proxy_redirect default;
}
}
}


However, navigating to port 80 results in an internal server error 500 - while navigating to port 1234 renders the expected output.



The log contains only "signal process started" entries.



What have I done wrong, or missed? How can I log a better (any!) description of the server error; I anticipate this is not the last time that would be useful.










share|improve this question














bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    1















    I have an extremely minimal configuration that I believe should reverse proxy what I see on example.com:1234 to example.com[:80].



    error_log /var/log/nginx/error.log info;

    events{
    }

    http{
    server{
    listen 80;
    server_name example.com;

    location / {
    proxy_pass http://example.com:1234;
    proxy_redirect default;
    }
    }
    }


    However, navigating to port 80 results in an internal server error 500 - while navigating to port 1234 renders the expected output.



    The log contains only "signal process started" entries.



    What have I done wrong, or missed? How can I log a better (any!) description of the server error; I anticipate this is not the last time that would be useful.










    share|improve this question














    bumped to the homepage by Community 8 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1








      I have an extremely minimal configuration that I believe should reverse proxy what I see on example.com:1234 to example.com[:80].



      error_log /var/log/nginx/error.log info;

      events{
      }

      http{
      server{
      listen 80;
      server_name example.com;

      location / {
      proxy_pass http://example.com:1234;
      proxy_redirect default;
      }
      }
      }


      However, navigating to port 80 results in an internal server error 500 - while navigating to port 1234 renders the expected output.



      The log contains only "signal process started" entries.



      What have I done wrong, or missed? How can I log a better (any!) description of the server error; I anticipate this is not the last time that would be useful.










      share|improve this question














      I have an extremely minimal configuration that I believe should reverse proxy what I see on example.com:1234 to example.com[:80].



      error_log /var/log/nginx/error.log info;

      events{
      }

      http{
      server{
      listen 80;
      server_name example.com;

      location / {
      proxy_pass http://example.com:1234;
      proxy_redirect default;
      }
      }
      }


      However, navigating to port 80 results in an internal server error 500 - while navigating to port 1234 renders the expected output.



      The log contains only "signal process started" entries.



      What have I done wrong, or missed? How can I log a better (any!) description of the server error; I anticipate this is not the last time that would be useful.







      nginx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '15 at 1:16









      OJFordOJFord

      11614




      11614





      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          If your backend is on the same host try using proxy_pass http://127.0.01:1234; instead proxy_pass http://example.com:1234;. NGINX invokes an internal name resolution logic before using DNS, since your server_name is the same as hostname in proxy_pass directive, this may be source of your problem.






          share|improve this answer































            0














            Just remove proxy_redirect and send another request to the NGINX. If there is still Internal Server error investigate the log file.


            Also, It will not harm if you check the backend (proxy_pass http://example.com) with curl from your server to getting sure your backend is healthy.






            share|improve this answer
























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "2"
              };
              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%2fserverfault.com%2fquestions%2f738225%2fbasic-nginx-proxy-pass-fails-with-http-500%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              If your backend is on the same host try using proxy_pass http://127.0.01:1234; instead proxy_pass http://example.com:1234;. NGINX invokes an internal name resolution logic before using DNS, since your server_name is the same as hostname in proxy_pass directive, this may be source of your problem.






              share|improve this answer




























                0














                If your backend is on the same host try using proxy_pass http://127.0.01:1234; instead proxy_pass http://example.com:1234;. NGINX invokes an internal name resolution logic before using DNS, since your server_name is the same as hostname in proxy_pass directive, this may be source of your problem.






                share|improve this answer


























                  0












                  0








                  0







                  If your backend is on the same host try using proxy_pass http://127.0.01:1234; instead proxy_pass http://example.com:1234;. NGINX invokes an internal name resolution logic before using DNS, since your server_name is the same as hostname in proxy_pass directive, this may be source of your problem.






                  share|improve this answer













                  If your backend is on the same host try using proxy_pass http://127.0.01:1234; instead proxy_pass http://example.com:1234;. NGINX invokes an internal name resolution logic before using DNS, since your server_name is the same as hostname in proxy_pass directive, this may be source of your problem.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 23 '15 at 5:00









                  dtoubelisdtoubelis

                  3,89612028




                  3,89612028

























                      0














                      Just remove proxy_redirect and send another request to the NGINX. If there is still Internal Server error investigate the log file.


                      Also, It will not harm if you check the backend (proxy_pass http://example.com) with curl from your server to getting sure your backend is healthy.






                      share|improve this answer




























                        0














                        Just remove proxy_redirect and send another request to the NGINX. If there is still Internal Server error investigate the log file.


                        Also, It will not harm if you check the backend (proxy_pass http://example.com) with curl from your server to getting sure your backend is healthy.






                        share|improve this answer


























                          0












                          0








                          0







                          Just remove proxy_redirect and send another request to the NGINX. If there is still Internal Server error investigate the log file.


                          Also, It will not harm if you check the backend (proxy_pass http://example.com) with curl from your server to getting sure your backend is healthy.






                          share|improve this answer













                          Just remove proxy_redirect and send another request to the NGINX. If there is still Internal Server error investigate the log file.


                          Also, It will not harm if you check the backend (proxy_pass http://example.com) with curl from your server to getting sure your backend is healthy.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 9 '18 at 12:36









                          Daniel GordiDaniel Gordi

                          846




                          846






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Server Fault!


                              • 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%2fserverfault.com%2fquestions%2f738225%2fbasic-nginx-proxy-pass-fails-with-http-500%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







                              Popular posts from this blog

                              As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                              Список ссавців Італії Природоохоронні статуси | Список |...

                              Українські прізвища Зміст Історичні відомості |...