Welcome! Log In Create A New Profile

Advanced

Re: Static Content on Different Server Isn't Loaded??

Francis Daly
June 23, 2015 05:50PM
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
Subject Author Posted

Static Content on Different Server Isn't Loaded??

smsmaddy1981 June 22, 2015 08:35AM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly June 23, 2015 05:50PM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 01, 2015 07:32PM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly August 02, 2015 06:06AM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 02, 2015 05:44PM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly August 02, 2015 06:32PM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 02, 2015 06:36PM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly August 02, 2015 06:48PM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 02, 2015 06:59PM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly August 02, 2015 07:08PM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 02, 2015 07:30PM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 17, 2015 05:30AM

Re: Static Content on Different Server Isn't Loaded??

smsmaddy1981 August 18, 2015 01:12PM

Re: Static Content on Different Server Isn't Loaded??

Francis Daly August 19, 2015 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready