cleanup posts
This commit is contained in:
parent
a1bdad57dd
commit
90f2a7cba2
11 changed files with 3 additions and 271 deletions
|
|
@ -9,7 +9,7 @@ title = "nginx: how to try multiple roots successively"
|
|||
As part of developing this new version of this site, I've needed to mess with nginx a lot to switch from Ghost to Gatsby, especially when related to hosting files out of multiple directories.
|
||||
<!-- excerpt -->
|
||||
|
||||
Specifically, this site is deployed by `rsync`ing the production version of the site onto the server behind `lfcode.ca`. I want to be able to use --delete to get rid of any old files for reliability reasons (don't want to rely on stuff that's not supposed to be there accidentally). Additionally, I am hosting static files at the root of `lfcode.ca`, which I don't want to manage with Gatsby.
|
||||
Specifically, this site is deployed by `rsync`ing the production version of the site onto the server hosting it. I want to be able to use `--delete` to get rid of any old files for reliability reasons (don't want to rely on stuff that's not supposed to be there accidentally). Additionally, I like being able to host random files on the server, which I don't want to manage with Gatsby.
|
||||
|
||||
What this means is that I need the server to try in order:
|
||||
- serve the file from the Gatsby directory
|
||||
|
|
@ -17,7 +17,7 @@ What this means is that I need the server to try in order:
|
|||
- serve it from the untracked static files
|
||||
- 404
|
||||
|
||||
There are countless StackOverflow posts on this exact issue, but for various reasons, they have their own issues.
|
||||
There are countless StackOverflow posts on this exact issue, but none were quite right for my use case.
|
||||
|
||||
One popular suggestion is to set the `root` to some directory above both content directories then use something like `try_files dir1$uri dir1$uri/ dir2$uri =404;`. This works... nearly.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue