Nginx's location and proxy_pass missing a request when hash is present in urlNginx location regex doesn't...

Inorganic chemistry handbook with reaction lists

How does a sound wave propagate?

How would an energy-based "projectile" blow up a spaceship?

Will the concrete slab in a partially heated shed conduct a lot of heat to the unconditioned area?

Is there a logarithm base for which the logarithm becomes an identity function?

Are small insurances worth it?

Can I negotiate a patent idea for a raise, under French law?

What exactly is the meaning of "fine wine"?

What do you call someone who likes to pick fights?

Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

A running toilet that stops itself

Giving a talk in my old university, how prominently should I tell students my salary?

What is better: yes / no radio, or simple checkbox?

Short story about an infectious indestructible metal bar?

What is Tony Stark injecting into himself in Iron Man 3?

Sort array by month and year

How do you make a gun that shoots melee weapons and/or swords?

Where is the License file location for Identity Server in Sitecore 9.1?

How to distinguish easily different soldier of ww2?

Is the differential, dp, exact or not?

Tool for measuring readability of English text

Why isn't P and P/poly trivially the same?

Can multiple states demand income tax from an LLC?

Draw this image in the TIKZ package



Nginx's location and proxy_pass missing a request when hash is present in url


Nginx location regex doesn't work with proxy passHelp needed setting up nginx to serve static filesTrouble with nginx and serving from multiple directories under the same domainNginx gives 504 Gateway Time-out once moved to liveNginx subversion commit failureLaravel 4.1 on nginx routes error 404nginx rewrite throw 404 with last and breaknginx configuration troubleHow to serve Autodiscover.xml using NginxUniversal HTTPS to HTTP reverse proxy using nginxNGINX virtual host config for Magento2 in a subfolder













0















I have this config



server {
listen 8080;
access_log /var/log/nginx/access.log;
root /usr/share/nginx/htdocs;
index index.html index.htm;
port_in_redirect off;

location /somepath/ {
proxy_pass http://someinternalserver/somepath/;
}

location /health {
return 200;
}
}


When I access it like this, http://our-external-fqdn/somepath/ it works.



However, when I access it like this, http://our-external-fqdn/somepath/# I get redirected to our local development setup which is http://localhost:8000



What am I missing?










share|improve this question














bumped to the homepage by Community 4 mins ago


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




















    0















    I have this config



    server {
    listen 8080;
    access_log /var/log/nginx/access.log;
    root /usr/share/nginx/htdocs;
    index index.html index.htm;
    port_in_redirect off;

    location /somepath/ {
    proxy_pass http://someinternalserver/somepath/;
    }

    location /health {
    return 200;
    }
    }


    When I access it like this, http://our-external-fqdn/somepath/ it works.



    However, when I access it like this, http://our-external-fqdn/somepath/# I get redirected to our local development setup which is http://localhost:8000



    What am I missing?










    share|improve this question














    bumped to the homepage by Community 4 mins ago


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


















      0












      0








      0








      I have this config



      server {
      listen 8080;
      access_log /var/log/nginx/access.log;
      root /usr/share/nginx/htdocs;
      index index.html index.htm;
      port_in_redirect off;

      location /somepath/ {
      proxy_pass http://someinternalserver/somepath/;
      }

      location /health {
      return 200;
      }
      }


      When I access it like this, http://our-external-fqdn/somepath/ it works.



      However, when I access it like this, http://our-external-fqdn/somepath/# I get redirected to our local development setup which is http://localhost:8000



      What am I missing?










      share|improve this question














      I have this config



      server {
      listen 8080;
      access_log /var/log/nginx/access.log;
      root /usr/share/nginx/htdocs;
      index index.html index.htm;
      port_in_redirect off;

      location /somepath/ {
      proxy_pass http://someinternalserver/somepath/;
      }

      location /health {
      return 200;
      }
      }


      When I access it like this, http://our-external-fqdn/somepath/ it works.



      However, when I access it like this, http://our-external-fqdn/somepath/# I get redirected to our local development setup which is http://localhost:8000



      What am I missing?







      nginx proxypass






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 27 '16 at 19:09









      devwannabedevwannabe

      14410




      14410





      bumped to the homepage by Community 4 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 4 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 Answer
          1






          active

          oldest

          votes


















          0














          You've specified an exact URL not a regular expression. Try this



          location ~* /somepath/ {
          proxy_pass http://someinternalserver/somepath/;
          }


          If that doesn't work please curl (with show headers, option is -D I think) the URL to see what's going on, or use Firefox with "Live HTTP Headers". Post the output for that request along with your access logs.






          share|improve this answer
























          • I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

            – devwannabe
            Apr 27 '16 at 20:04











          • Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

            – Tim
            Apr 27 '16 at 20:17













          • Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

            – Tim
            Apr 27 '16 at 20:18











          • Tim, that's all my nginx.conf file. It's really that simple.

            – devwannabe
            Apr 27 '16 at 20:28











          • i removed the trailing slash but I still got the same error

            – devwannabe
            Apr 27 '16 at 20:34











          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%2f773384%2fnginxs-location-and-proxy-pass-missing-a-request-when-hash-is-present-in-url%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














          You've specified an exact URL not a regular expression. Try this



          location ~* /somepath/ {
          proxy_pass http://someinternalserver/somepath/;
          }


          If that doesn't work please curl (with show headers, option is -D I think) the URL to see what's going on, or use Firefox with "Live HTTP Headers". Post the output for that request along with your access logs.






          share|improve this answer
























          • I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

            – devwannabe
            Apr 27 '16 at 20:04











          • Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

            – Tim
            Apr 27 '16 at 20:17













          • Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

            – Tim
            Apr 27 '16 at 20:18











          • Tim, that's all my nginx.conf file. It's really that simple.

            – devwannabe
            Apr 27 '16 at 20:28











          • i removed the trailing slash but I still got the same error

            – devwannabe
            Apr 27 '16 at 20:34
















          0














          You've specified an exact URL not a regular expression. Try this



          location ~* /somepath/ {
          proxy_pass http://someinternalserver/somepath/;
          }


          If that doesn't work please curl (with show headers, option is -D I think) the URL to see what's going on, or use Firefox with "Live HTTP Headers". Post the output for that request along with your access logs.






          share|improve this answer
























          • I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

            – devwannabe
            Apr 27 '16 at 20:04











          • Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

            – Tim
            Apr 27 '16 at 20:17













          • Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

            – Tim
            Apr 27 '16 at 20:18











          • Tim, that's all my nginx.conf file. It's really that simple.

            – devwannabe
            Apr 27 '16 at 20:28











          • i removed the trailing slash but I still got the same error

            – devwannabe
            Apr 27 '16 at 20:34














          0












          0








          0







          You've specified an exact URL not a regular expression. Try this



          location ~* /somepath/ {
          proxy_pass http://someinternalserver/somepath/;
          }


          If that doesn't work please curl (with show headers, option is -D I think) the URL to see what's going on, or use Firefox with "Live HTTP Headers". Post the output for that request along with your access logs.






          share|improve this answer













          You've specified an exact URL not a regular expression. Try this



          location ~* /somepath/ {
          proxy_pass http://someinternalserver/somepath/;
          }


          If that doesn't work please curl (with show headers, option is -D I think) the URL to see what's going on, or use Firefox with "Live HTTP Headers". Post the output for that request along with your access logs.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 27 '16 at 19:56









          TimTim

          17.7k41949




          17.7k41949













          • I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

            – devwannabe
            Apr 27 '16 at 20:04











          • Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

            – Tim
            Apr 27 '16 at 20:17













          • Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

            – Tim
            Apr 27 '16 at 20:18











          • Tim, that's all my nginx.conf file. It's really that simple.

            – devwannabe
            Apr 27 '16 at 20:28











          • i removed the trailing slash but I still got the same error

            – devwannabe
            Apr 27 '16 at 20:34



















          • I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

            – devwannabe
            Apr 27 '16 at 20:04











          • Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

            – Tim
            Apr 27 '16 at 20:17













          • Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

            – Tim
            Apr 27 '16 at 20:18











          • Tim, that's all my nginx.conf file. It's really that simple.

            – devwannabe
            Apr 27 '16 at 20:28











          • i removed the trailing slash but I still got the same error

            – devwannabe
            Apr 27 '16 at 20:34

















          I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

          – devwannabe
          Apr 27 '16 at 20:04





          I got an error after I restarted nginx - nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/etc/nginx/nginx.conf:138

          – devwannabe
          Apr 27 '16 at 20:04













          Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

          – Tim
          Apr 27 '16 at 20:17







          Edit your original question to include your your nginx.conf and and site configuration files. Add this to the bottom of your original post, don't replace your original question. I think though my answer is incorrect, and that you may need to go back to the original configuration. I use fastcgi_pass with regular expression matches, but not proxy_pass. Suggest you do my "if that doesn't work" and post that information as well.

          – Tim
          Apr 27 '16 at 20:17















          Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

          – Tim
          Apr 27 '16 at 20:18





          Also, read this, which says remove the trailing slash from the end of your proxy_pass statement serverfault.com/questions/649151/…

          – Tim
          Apr 27 '16 at 20:18













          Tim, that's all my nginx.conf file. It's really that simple.

          – devwannabe
          Apr 27 '16 at 20:28





          Tim, that's all my nginx.conf file. It's really that simple.

          – devwannabe
          Apr 27 '16 at 20:28













          i removed the trailing slash but I still got the same error

          – devwannabe
          Apr 27 '16 at 20:34





          i removed the trailing slash but I still got the same error

          – devwannabe
          Apr 27 '16 at 20:34


















          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%2f773384%2fnginxs-location-and-proxy-pass-missing-a-request-when-hash-is-present-in-url%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...

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

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