Static Content on Different Server Isn't Loaded??

smsmaddy1981 nginx-forum at nginx.us
Sat Aug 1 23:32:42 UTC 2015


Hi Francis,

I tried possible options suggested proxy_pass, fastcgi_pass...and was
unsuccessful
This query was posted in another request
http://forum.nginx.org/read.php?2,260231,260232#msg-260232 and you are smart
to redirect me back to this earlier request.

I would like to detail more on my question pls., 
I have plenty of 5 different services deployed on different 5 servers. I
have NGINX deployed on one server (1) where application 1 is deployed. Other
services are on different servers (2,3,4,5).

Now, whenever there is an web request...via NGINX... the configuration is
able to read the static data of service 1...as it is deployed on the same
server where NGINX is installed.

Issue arises, when trying to access services deployed on other servers
(2,3,4,5). request is reached via upstream servers configured.
Unfortunately, the static content (2,3,4,5) servers are not getting
fetched/loaded. Rather, it is trying to find the data on NGINX installed
machine only.

error.log:
2015/08/02 01:11:09 [error] 30243#0: *72 open()
"/var/gvp/Nginx/nginx-1.8.0/html/pvp/img/rvi.jpg" failed (2: No such file or
directory)


nginx.conf details below

  server {
       listen 80;
       server_name ser-01;

       location /pvp/{
          proxy_pass http://ser02;
       }

       location /gen/ {
          proxy_pass http://ser03;
       }

       location /config/ {
          proxy_pass http://ser04;
       }

       location /stat/ {
          proxy_pass http://ser05;
       }
}

    upstream ser01{
        ip_hash;
        server 10.177.54.92:9092;
        server 10.177.54.93:9092;
    }

    upstream ser02 {
        ip_hash;
        server 10.176.54.92:9091;
        server 10.176.54.93:9091;
    }

    upstream ser03 {
        ip_hash;
        server 10.175.54.94:8181;
        server 10.175.54.95:8181;
    }

    upstream ser04 {
        ip_hash;
        server 10.174.54.74:8080;
        server 10.174.54.76:8080;
    }


Now, please assist me with an pointing to an code snippet/examples which
show server my above requirement.

Your answer will decide my consideration of Nginx implementation in my
project. Awaiting for your updates.


Best regards,
Maddy

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259786,260695#msg-260695



More information about the nginx mailing list