Set location block in nginx to avoid 404 errorHow to serve pages from another domain using Nginxnginx rewrite throw 404 with last and breakNginx location testing is not redirecting to the correct pageNginx location does not workNginx showing 404 no matter the configNginx Location Block AliasPrestashop nginx Categories 404Nginx giving 404 on valid image filenginx multiple location directives all give 404 pagesNginx erorr 404 Not Found

Why are stats in Angband written as 18/** instead of 19, 20...?

How to determine the distribution of Ubuntu

If you attack a Tarrasque while swallowed, what AC do you need to beat to hit it?

How can sister protect herself from impulse purchases with a credit card?

Can a problematic AL DM/organizer prevent me from running a separate AL-legal game at the same store?

Why does snapping your fingers activate the Infinity Gauntlet?

Why does Taylor’s series “work”?

Why should one apply for UK visa before other visas, on a multi-destination European holiday?

What should I wear to go and sign an employment contract?

Why aren't satellites disintegrated even though they orbit earth within earth's Roche Limits?

Will this series of events work to drown the Tarrasque?

Does a windmilling propeller create more drag than a stopped propeller in an engine out scenario?

Easier way to draw a filled ellipse with top edge dashed and bottom edge solid?

Have the writers and actors of Game Of Thrones responded to its poor reception?

Addressing an email

Is it wise to pay off mortgage with 401k?

Head-internal relative clauses

What city and town structures are important in a low fantasy medieval world?

What does this 'x' mean on the stem of the voice's note, above the notehead?

Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?

Novel where a cube cooled below absolute zero makes a hole in reality

Better than Rembrandt

In how many ways can we partition a set into smaller subsets so the sum of the numbers in each subset is equal?

On a piano, are the effects of holding notes and the sustain pedal the same for a single chord?



Set location block in nginx to avoid 404 error


How to serve pages from another domain using Nginxnginx rewrite throw 404 with last and breakNginx location testing is not redirecting to the correct pageNginx location does not workNginx showing 404 no matter the configNginx Location Block AliasPrestashop nginx Categories 404Nginx giving 404 on valid image filenginx multiple location directives all give 404 pagesNginx erorr 404 Not Found






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








0















My normal site works okay its accessible,



I have two other routes to the site:



/settings and /dialog...



They can work by both hitting the same folder, well they have to as it's a react-app and thats how it's set up and it uses a dist folder! (nwb)



Anyway so in /etc/nginx/sites-available/default, after following some guides, I thought I had correctly set up a location block Yet I still get a 404 error, please take a look at the code:



server 
// works
root /var/www/nwb-dashboard/dist;
server_name blaque.live www.blaque.live;
index index.html index.htm;

// doesnt work
location /settings/
alias /var/www/nwb-dashboard/dist;
index index.html index.htm




the nginx file is okay, and ive tried restarting many times, is there something im missing here??



Thanks if you can help!










share|improve this question






























    0















    My normal site works okay its accessible,



    I have two other routes to the site:



    /settings and /dialog...



    They can work by both hitting the same folder, well they have to as it's a react-app and thats how it's set up and it uses a dist folder! (nwb)



    Anyway so in /etc/nginx/sites-available/default, after following some guides, I thought I had correctly set up a location block Yet I still get a 404 error, please take a look at the code:



    server 
    // works
    root /var/www/nwb-dashboard/dist;
    server_name blaque.live www.blaque.live;
    index index.html index.htm;

    // doesnt work
    location /settings/
    alias /var/www/nwb-dashboard/dist;
    index index.html index.htm




    the nginx file is okay, and ive tried restarting many times, is there something im missing here??



    Thanks if you can help!










    share|improve this question


























      0












      0








      0








      My normal site works okay its accessible,



      I have two other routes to the site:



      /settings and /dialog...



      They can work by both hitting the same folder, well they have to as it's a react-app and thats how it's set up and it uses a dist folder! (nwb)



      Anyway so in /etc/nginx/sites-available/default, after following some guides, I thought I had correctly set up a location block Yet I still get a 404 error, please take a look at the code:



      server 
      // works
      root /var/www/nwb-dashboard/dist;
      server_name blaque.live www.blaque.live;
      index index.html index.htm;

      // doesnt work
      location /settings/
      alias /var/www/nwb-dashboard/dist;
      index index.html index.htm




      the nginx file is okay, and ive tried restarting many times, is there something im missing here??



      Thanks if you can help!










      share|improve this question
















      My normal site works okay its accessible,



      I have two other routes to the site:



      /settings and /dialog...



      They can work by both hitting the same folder, well they have to as it's a react-app and thats how it's set up and it uses a dist folder! (nwb)



      Anyway so in /etc/nginx/sites-available/default, after following some guides, I thought I had correctly set up a location block Yet I still get a 404 error, please take a look at the code:



      server 
      // works
      root /var/www/nwb-dashboard/dist;
      server_name blaque.live www.blaque.live;
      index index.html index.htm;

      // doesnt work
      location /settings/
      alias /var/www/nwb-dashboard/dist;
      index index.html index.htm




      the nginx file is okay, and ive tried restarting many times, is there something im missing here??



      Thanks if you can help!







      ubuntu nginx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 at 19:18







      Sparlarva

















      asked Mar 23 at 18:37









      SparlarvaSparlarva

      26211




      26211






















          0






          active

          oldest

          votes












          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%2f55317130%2fset-location-block-in-nginx-to-avoid-404-error%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55317130%2fset-location-block-in-nginx-to-avoid-404-error%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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript