Skip to content

Commit 6c2aa4e

Browse files
authored
Angular: Change the default Nginx paths to /tmp in Docker Container (#23837)
## Description In your Angular + Nginx Docker example you are running a non-root user, but by default Nginx will try to write to directories like `/var/cache/nginx/`. Which will cause errors like: ``` mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied) ``` This PR fixes that, and simply changing the default temp path directories (like you did for the pid file as well) to the `/tmp` directory. Which will work when using the `nginx` user in Docker. Mainly `client_body_temp_path` change was needed here, but I would set more just to be sure. ## Reviews - [x] Technical review - [x] Editorial review - [ ] Product review
1 parent 74e6153 commit 6c2aa4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

content/guides/angular/containerize.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ http {
280280
include /etc/nginx/mime.types;
281281
default_type application/octet-stream;
282282
283+
client_body_temp_path /tmp/client_temp;
284+
proxy_temp_path /tmp/proxy_temp_path;
285+
fastcgi_temp_path /tmp/fastcgi_temp;
286+
uwsgi_temp_path /tmp/uwsgi_temp;
287+
scgi_temp_path /tmp/scgi_temp;
288+
283289
# Logging
284290
access_log off;
285291
error_log /dev/stderr warn;

0 commit comments

Comments
 (0)