Yes the destination URl [https://www.xys.org/static/js/widget.js] is working perfectly alone Why it tried locally? I used proxypass rule for it. If I wanted to do anything to enable proxy capability in my Nginx?
Thanks for your reply Roni -----Original Message----- From: nginx [mailto:nginx-boun...@nginx.org] On Behalf Of Anoop Alias Sent: 06 April 2016 18:51 To: Nginx Subject: Re: Help for nginx proxy pass rule Are you sure the location is working? abc.com/static/js/widget.js" failed (2: No such file or directory) - I think its trying to access that file locally and not via the proxy On Wed, Apr 6, 2016 at 4:14 PM, Roni Baby <r...@citrusinformatics.com> wrote: > HI, > > > > We have a WordPress site named it as https://www.abc.com; We are using > Nginx as the web server for this site. I wanted to create a proxy pass > rule like this > > > > https://www.abc.com/static/js/widget.js will be load from > https://www.xys.org/static/js/widget.js without changing URL > > > > Here is the configuration that I configured for this requirement in > the www.abc.com Nginx site configuration file > > > > location /static { > > proxy_pass https://www.xys.org/static; > > proxy_set_header Host www.xys.org; > > proxy_set_header X-Real-IP $remote_addr; > > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > > proxy_set_header X-Forwarded-Proto $scheme; > > } > > > > When I access https://www.abc.com/static/js/widget.js, I am getting > Nginx > 404 Not Found error with the following error log in its log file > > 2016/04/06 06:39:14 [error] 20107#0: *907 open() > "/usr/share/nginx/html/www.abc.com/static/js/widget.js" failed (2: No > such file or directory), client: 118.102.223.138, server: www.abc.com, request: > "GET /static/js/widget.js HTTP/1.1", host: www.abc.com > > I have tried different Nginx proxy pass configuration but not success yet. > It will be good to get your thought to fix this issues > > Thanks > > Roni > > > > > _______________________________________________ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx -- Anoop P Alias _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx