aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2022-11-11-nginx-tmp-errors.org
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
committerChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
commit51a7a02f0c96d49b68fbcc155414c218207fa270 (patch)
tree845af8aad0e8769352efc02fcd1044eed9cc1ec1 /content/blog/2022-11-11-nginx-tmp-errors.org
parent7d3e80ebf1dc770eac0e21890b74f18ba2d15a6b (diff)
downloadcleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.gz
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.bz2
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.zip
fix grammar in 2022 posts
Diffstat (limited to 'content/blog/2022-11-11-nginx-tmp-errors.org')
-rw-r--r--content/blog/2022-11-11-nginx-tmp-errors.org33
1 files changed, 16 insertions, 17 deletions
diff --git a/content/blog/2022-11-11-nginx-tmp-errors.org b/content/blog/2022-11-11-nginx-tmp-errors.org
index 9522c55..dd5d654 100644
--- a/content/blog/2022-11-11-nginx-tmp-errors.org
+++ b/content/blog/2022-11-11-nginx-tmp-errors.org
@@ -8,10 +8,10 @@ has occurred multiple times for me./
* The Problem
-After migrating to a new server OS, I started receiving quite a few
-permission errors like the one below. These popped up for various
-different websites I'm serving via Nginx on this server, but did not
-prevent the website from loading.
+After migrating to a new server operating system (OS), I started receiving quite
+a few permission errors like the one below. These popped up for various
+different websites I'm serving via Nginx on this server, but did not prevent the
+website from loading.
I found the errors in the standard log file:
@@ -23,19 +23,18 @@ cat /var/log/nginx/error.log
2022/11/11 11:30:34 [crit] 8970#8970: *10 open() "/var/lib/nginx/tmp/proxy/3/00/0000000003" failed (13: Permission denied) while reading upstream, client: 169.150.203.10, server: cyberchef.example.com, request: "GET /assets/main.css HTTP/2.0", upstream: "http://127.0.0.1:8111/assets/main.css", host: "cyberchef.example.com", referrer: "https://cyberchef.example.com/"
#+end_src
-You can see that the error is =13: Permission denied= and it occurs in
-the =/var/lib/nginx/tmp/= directory. In my case, I had thousands of
-errors where Nginx was denied permission to read/write files in this
-directory.
+You can see that the error is =13: Permission denied= and it occurs in the
+=/var/lib/nginx/tmp/= directory. In my case, I had thousands of errors where
+Nginx was denied permission to read/write files in this directory.
So how do I fix it?
* The Solution
-In order to resolve the issue, I had to ensure the =/var/lib/nginx=
-directory is owned by Nginx. Mine was owned by the =www= user and Nginx
-was not able to read or write files within that directory. This
-prevented Nginx from caching temporary files.
+In order to resolve the issue, I had to ensure the =/var/lib/nginx= directory is
+owned by Nginx. Mine was owned by the =www= user and Nginx was not able to read
+or write files within that directory. This prevented Nginx from caching
+temporary files.
#+begin_src sh
# Alpine Linux
@@ -45,9 +44,9 @@ doas chown -R nginx:nginx /var/lib/nginx
sudo chown -R nginx:nginx /var/lib/nginx
#+end_src
-You /may/ also be able to change the =proxy_temp_path= in your Nginx
-config, but I did not try this. Here's a suggestion I found online that
-may work if the above solution does not:
+You /may/ also be able to change the =proxy_temp_path= in your Nginx config, but
+I did not try this. Here's a suggestion I found online that may work if the
+above solution does not:
#+begin_src sh
nano /etc/nginx/http.d/example.com.conf
@@ -65,8 +64,8 @@ server {
}
#+end_src
-Finally, restart Nginx and your server should be able to cache temporary
-files again.
+Finally, restart Nginx and your server should be able to cache temporary files
+again.
#+begin_src sh
# Alpine Linux (OpenRC)