Welcome! Log In Create A New Profile

Advanced

Re: django app static files on the different server not get loaded

Francis Daly
January 05, 2022 10:52AM
On Mon, Jan 03, 2022 at 05:58:32PM -0500, ningja wrote:

Hi there,

> After I modified my app2 and put all my static files to static_app2 and with
> Francis' suggestion location = /static_app2/img/logo-2.jpg { proxy_pass
> https://test2.com:444; } . I was able to solve my problem.

Good stuff; thanks for sharing the result.

You probably already have this in place, but just in case not:

If all of your app2-static files are below the url prefix "/static_app2/",
you can add one location to proxy_pass them all to the test2 server, like

location /static_app2/ { proxy_pass https://test2.com:444; }

and remove the "location =" piece that was there previously.

And if an "app3" in another container is added later, the central
nginx.conf should only need the two new locations (/app3, and
/static-app3/) for things to work as wanted too.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

django app static files on the different server not get loaded

ningja December 31, 2021 05:45PM

Re: django app static files on the different server not get loaded

Francis Daly January 02, 2022 07:54AM

Re: django app static files on the different server not get loaded

ningja January 02, 2022 04:26PM

Re: django app static files on the different server not get loaded

Paul January 02, 2022 06:34PM

Re: django app static files on the different server not get loaded

ningja January 02, 2022 08:56PM

Re: django app static files on the different server not get loaded

ningja January 03, 2022 08:52AM

Re: django app static files on the different server not get loaded

Francis Daly January 03, 2022 05:54AM

Re: django app static files on the different server not get loaded

ningja January 03, 2022 08:49AM

Re: django app static files on the different server not get loaded

ningja January 03, 2022 09:59AM

Re: django app static files on the different server not get loaded

ningja January 03, 2022 05:58PM

Re: django app static files on the different server not get loaded

Francis Daly January 05, 2022 10:52AM

Re: django app static files on the different server not get loaded

ningja January 05, 2022 11:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
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