Help for nginx proxy pass rule

Roni Baby roni at
Wed Apr 6 10:44:50 UTC 2016



We have a WordPress site named it as; We are using Nginx
as the web server for this site. I wanted to create a proxy pass rule like
this will be load from without changing URL


Here is the configuration that I configured for this requirement in the Nginx site configuration file


location /static {


        proxy_set_header Host;

        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,  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/" failed (2: No such
file or directory), client:, server:, request:
"GET /static/js/widget.js HTTP/1.1", host:

I have tried different Nginx proxy pass configuration but not success yet.
It will be good to get your thought to fix this issues




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list