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

5
  • Do you get nginx 404 or rails 404? Commented Mar 14, 2016 at 16:52
  • nginx 404 .....
    – Mani
    Commented Mar 14, 2016 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
    Commented Mar 14, 2016 at 16:55
  • I commented that line and still giving 404 , what else should i try
    – Mani
    Commented Mar 14, 2016 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? Commented Mar 14, 2016 at 20:14

0

You must log in to answer this question.

Browse other questions tagged .