Score:0

How to define a common location once in NGINX and share it across multiple server blocks?

bd flag

I have several server blocks, each one corresponds to a different domain. All of them share a common location that has the purpose of renewing SSH certificates (for those familiar with this, it's the .well-known route that Letsencrypt uses for that purpose, just in case someone out here already solved this ;) ).

I'd like to define this location once and share it across each different server block, but I can't seem to find an appropriate directive in the documentation. Any pointers are deeply appreciated :)

in flag
There are already tons of answers to this. Just define the location block outside of the server blocks.
bd flag
Sorry for that, I searched for similar questions and read all suggested answers when writing this and none was about this. You can define a location block outside of a server block?
jp flag
What about using `include`?
bd flag
I would define a location block in an include file? By itself?
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.