Score:0

reverse proxy nginx to proxied nginx instance. with SSL and static, how?

ng flag

I have nginx & webserver that are working together on the same server and it's working flawlessly.

Now I need to move the webserver to another physical server (B or C) enter image description here

it's was seem easy at first glance, but keeping SSL & static seem to make thing more difficult that it should be...

When evertyhing was on the same server (A) I had this in the nginx config file (for the static)

location  /static/ {
    alias /somewhere/static/;
}

but it seem (TBC) that static command only point to local.

So it was advised (without more explanation of course)

To run a main nginx that act as the reverse proxy, and nginx instance on the proxied server (B,C)

sound logic, but I can't found any documentation that explain how link the Main the to proxied and have the SSL & static working...

(edit: of course If I could have the most of the config directive on (A) SSL etc.. that would be awesome.. )

Thanks.

Score:0
ng flag

I spend a "little" time to figure it out. but I least I made it..

The best as always it's to start from scratch..

For those who look also the answer, on (A) you just handle the SSL and the proxy_pass to the peroxided and that all. and all the rest on the peroxided :)

I'm keeping on eye on this post, in case you need more info.

Cheers

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.