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
nginx doesn't know about static content.
nginx knows about requests that should be served from this
filesystem -- directives root (http://nginx.org/r/root) or alias
(http://nginx.org/r/alias) are probably most interesting --
and requests that should be proxy_pass'ed to another web server
(http://nginx.org/r/proxy_pass) and requests that should be
fastcgi_pass'ed to a fastcgi server (http://nginx.org/r/fastcgi_pass)
and a few other things.
> 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".
> location ~*\.(js|jpg|png|css)$ {
> root /WEB-INF/classes/static/;
> http://<DNS_NODE_02>/livetest/WEB-INF/classes/static/classes;
> expires 30d;
> }
I get
nginx: [emerg] unknown directive
"http://<DNS_NODE_02>/livetest/WEB-INF/classes/static/classes" in
/usr/local/nginx/conf/nginx.conf:15
If you are going to show config you use, please copy-paste and do not re-type.
After you describe what exactly you want nginx to do, if the answer is
not already clear to you, possibly someone will be able to help.
f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx