June 30, 2015 10:38AM
On Tue, Jun 30, 2015 at 12:19 PM, smsmaddy1981 <nginx-forum@nginx.us> wrote:
> Hi,
> I have NGinx 1.8.0 installed successfully and configured NGinx... with
> upstream servers provided. NGinx and Services are deployed on separate
> machines. Now, when an request is made via NGinx, the service is invoked
> resulting in UI with no static content loaded.
>
> I have tried root, rewrite directives... to specify the static content path
> on another server (workspace.corp.test.no), which didn't helped. I might be
> wrong with configuration. Pls. assist
>
>
> server {
> listen 80;
> server_name workspace.corp.test.no;
>
> location ~"*\.(js|jpg|png|css)$" {
> root /workspace/WEB-INF/classes/static;
> expires 30d;
> }
>
> location /{
> proxy_pass http://workspace.corp.test.no/workspace/agentLogin/;
> }
> }
>
>
> And, the above configuration is expecting static content on the server where
> NGinx is installed, when an request is made. But, I expect the static
> content to be expected from remote server.
>
That is the problem! You're telling it the static content is in the
local system at '/workspace/WEB-INF/classes/static' when its not...

Assuming the "frontend" is proxying to another nginx server you
should only define "location ~"*\.(js|jpg|png|css)$" {" in the 'inner'
(for lack of a better term) nginx server.

>
>
> Best regards,
> Maddy
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259989,259989#msg-259989
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Static content

smsmaddy1981 June 30, 2015 07:19AM

Re: Static content

mike-pt June 30, 2015 10:38AM

Re: Static content

smsmaddy1981 June 30, 2015 05:04PM

Re: Static content

mike-pt June 30, 2015 05:52PM

Re: Static content

smsmaddy1981 July 07, 2015 07:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready