0

I have a wordpress site , let's say domain.com working on nginx . now i have a rails application running on same server with port 4567 . I want to bypass it using nginx location block in my domain.com . So far i have the following :

   location = /abc_app
    {
        client_max_body_size 45M;
        try_files      $uri =404;
        proxy_pass  http://127.0.0.1:4567;
         proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

When i try to access it using domain.com/abc_app it give me 404 Any help will be much appreciating

  • Do you get nginx 404 or rails 404? – Parthian Shot Mar 14 '16 at 16:52
  • nginx 404 ..... – ImranNaqvi Mar 14 '16 at 16:53
  • You are telling it to give a 404 with try_files $uri =404; It is going to try the local directory and if it can't find your file give you a 404 – Drifter104 Mar 14 '16 at 16:55
  • I commented that line and still giving 404 , what else should i try – ImranNaqvi Mar 14 '16 at 16:57
  • What URI are you trying to access on http://127.0.0.1:4567? Is it http://127.0.0.1:4567/abc_app? – Richard Smith Mar 14 '16 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.