I have static content available on the remote server (say NODE 02) and
PATH:
…/livetest/WEB-INF/static/classes/
under which I have /image, /js, /styles folders
I have installed nginx-1.8.0 on server (Say Node 01).
While accessing the application, the static contents are not getting
loaded.
On Mon, Jun 22, 2015 at 08:35:32AM -0400, smsmaddy1981 wrote:
Hi there,
I have static content available on the remote server (say NODE 02) and PATH:
…/livetest/WEB-INF/static/classes/
under which I have /image, /js, /styles folders
While accessing the application, the static contents are not getting
loaded.
Can you show one request for one thing that you consider to be some
static
content? “curl” is usually a good command for showing the request made
and the response received.
What do you want nginx to do with this request?
The answer should (probably) be “serve this named file from the local
filesystem”, or “tell the client to go and request this other url
from this or another web server”, or “fetch this specific url from this other web server, and send it to the client”.
I tried possible options suggested proxy_pass, fastcgi_pass…and was
unsuccessful
This query was posted in another request Re: remote server static content is not getting loaded 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)
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.
On Sat, Aug 01, 2015 at 07:32:42PM -0400, smsmaddy1981 wrote:
Hi there,
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.
I don’t see answers to my previous questions here.
(What request do you make?; what response do you get?)
Whenenver an web request is made accessing the application (deployed on
ser02)…through upstream configuration…the service responds reaching
ser02…but static files (/content/img.jpg) are not rendered. The access_log
shows the file is trying to look on ser01 (Nginx is installed)
If you still see a problem, can you list the exact request that does
work as you want, and the exact request that does not work as you want?
“/content/img.jpg” is sepcific to an application and which is deployed
on
“ser02”.
Whenenver an web request is made accessing the application (deployed on
ser02)…through upstream configuration…the service responds reaching
ser02…but static files (/content/img.jpg) are not rendered. The
access_log
shows the file is trying to look on ser01 (Nginx is installed)
(You can configure nginx to know what that special thing is, so that
things
will work as you want.)
How pls.???