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
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.
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.
You said it yourself:
“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.”
Nginx expets the file to be on the server, and that’s how it works…
you need to either make them available in that server, in the path
you’re specifing or just “drop” that location block in this server.
Are you’re upstream server other nginx servers?
Melhores Cumprimentos // Best Regards
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.