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

2022-01-05 Thread ningja
Thank you. Francis. I did just as you said. location /static_app2/ { proxy_pass https://test2.com:444; } Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293219,293265#msg-293265 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/

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

2022-01-05 Thread Francis Daly
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; than

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

2022-01-03 Thread ningja
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. Thank you Francis and Paul. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,29

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

2022-01-03 Thread ningja
Hi Francis, I tried your suggestion. location = /static2/img/logo-2.jpg { proxy_pass https://test2.com:444; } and I can access the img from http://test1/static2/img/logo-2.jpg. I'll try to edit my app2 django to use static2 instead static. Thank you for your suggestion, Sue Posted at Nginx For

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

2022-01-03 Thread ningja
p.s. If I do curl from my local without connect vpn. curl https://test1.com and I got the landing page of the app1. curl https://test2.com I got 301. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293219,293235#msg-293235 ___ nginx mailing

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

2022-01-03 Thread ningja
Hi Francis, Thank you. "Yes" both apps have static directory. From the error message that seems nginx IS looking under different path "app1/static" for app1 and "app2/static" for app2 . Does it means "static" did not confuse nginx? (I am not 100% sure ) another thing I should mention : I added a

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

2022-01-03 Thread Francis Daly
On Sun, Jan 02, 2022 at 04:26:40PM -0500, ningja wrote: Hi there, > The issue is I need to configure nginx1 to allow people to access app2 from > the public internet. The config file I post here is from test1 server. > With this config I can access app2 html pages from the internet (just what I

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

2022-01-02 Thread ningja
Hi Paul, Thank you for reply my question. We supposed to get snow tomorrow too. Looking forward to it... On test1 box I did curl https://test1.com and I got the landing page of the app1. On test1 box : curl -k https://test2.com I got the landing page of the app2. Please see the nginx config file

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

2022-01-02 Thread Paul
A happy new 2022 to all. A few thoughts, Sunday afternoon, watching the snow fall... On 2022-01-02 4:26 p.m., ningja wrote: [snip] App1 can load the static files and run correctly from URL https://test1.com/app1. Test2 has a Django app2 which has static files under /app/public/static on server

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

2022-01-02 Thread ningja
Hi Francis, Thank you for spent time to answer my question. I am sorry for some of the confusion here. App1 can load the static files and run correctly from URL https://test1.com/app1. Test2 has a Django app2 which has static files under /app/public/static on server test2. I can access it from URL

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

2022-01-02 Thread Francis Daly
On Fri, Dec 31, 2021 at 05:45:07PM -0500, ningja wrote: Hi there, > I have two server test1.com and test2.com. test1 is internet public face > server. Test2 is intranet only server. Both servers have nginx docker > running. I think you are saying that the world can access https://test1.com/app1

django app static files on the different server not get loaded

2021-12-31 Thread ningja
I have two server test1.com and test2.com. test1 is internet public face server. Test2 is intranet only server. Both servers have nginx docker running. Test1 run a Django app1 which has static files under /app/public/static. App1 can load the static files and run correctly from URL https://test1.c