Skip to content

Commit 1a23907

Browse files
author
Jamie Curnow
committed
Update config path to data path
1 parent 7b3d637 commit 1a23907

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ services:
3333
- 81:81
3434
- 443:443
3535
volumes:
36+
- ./data:/data
3637
- ./letsencrypt:/etc/letsencrypt
3738
```
3839
@@ -50,6 +51,7 @@ docker run -d \
5051
-p 80:80 \
5152
-p 81:81 \
5253
-p 443:443 \
54+
-v /path/to/data:/data \
5355
-v /path/to/letsencrypt:/etc/letsencrypt \
5456
jc21/nginx-proxy-manager
5557
```
@@ -82,3 +84,4 @@ I won't go in to too much detail here but here are the basics for someone new to
8284
2. Add port forwarding for port 80 and 443 to the server hosting this project
8385
3. Configure your ___domain name details to point to your home, either with a static ip or a service like DuckDNS
8486
4. Use the Nginx Proxy Manager here as your gateway to forward to your other web based services
87+

rootfs/etc/nginx/nginx.conf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ worker_processes auto;
99
# Enables the use of JIT for regular expressions to speed-up their processing.
1010
pcre_jit on;
1111

12-
error_log /config/logs/error.log warn;
12+
error_log /data/logs/error.log warn;
1313

1414
# Includes files with directives to load dynamic modules.
1515
include /etc/nginx/modules/*.conf;
@@ -48,12 +48,13 @@ http {
4848
# - (dash) - request never reached to upstream module. Most likely it was processed at Nginx-level only (e.g. forbidden, redirects, etc) (Ref: Mail Thread
4949
log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
5050

51-
access_log /config/logs/default.log proxy;
51+
access_log /data/logs/default.log proxy;
5252

5353
include /etc/nginx/conf.d/*.conf;
54-
include /config/nginx/*.conf;
54+
include /data/nginx/*.conf;
5555
}
5656

5757
stream {
58-
include /config/nginx/stream/*.conf;
58+
include /data/nginx/stream/*.conf;
5959
}
60+

rootfs/etc/services.d/nginx/run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/with-contenv bash
22

3-
mkdir -p /tmp/nginx /data/{nginx,logs,access} /data/nginx/stream /var/lib/nginx/cache/{public,private}
3+
mkdir -p /tmp/nginx \
4+
/data/{nginx,logs,access} \
5+
/data/nginx/stream \
6+
/var/lib/nginx/cache/{public,private}
7+
48
chown root /tmp/nginx
59
exec nginx
10+

0 commit comments

Comments
 (0)