-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnpm_proxy.conf
67 lines (49 loc) · 2.25 KB
/
npm_proxy.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ------------------------------------------------------------
# example.domain.com
# ------------------------------------------------------------
server {
set $forward_scheme http;
set $server "192.168.1.2"; # Host IP on LAN
set $port 3000; # Host Port on LAN
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.domain.com;
# Custom SSL
ssl_certificate /data/custom_ssl/npm-3/fullchain.pem;
ssl_certificate_key /data/custom_ssl/npm-3/privkey.pem;
# These are the paths inside the docker container.
# So in the host directory, the full path would be: /user/nginx/data.
# See prerequisites in the readme.
# Asset Caching
include conf.d/include/assets.conf;
# Block Exploits
include conf.d/include/block-exploits.conf;
# Force SSL
include conf.d/include/force-ssl.conf;
# Asset Caching, Block Exploits, and Force SSL may or may not exist in your containers path. For whatever reason, they didn't in mine.
# If they don't exist for you, you'll have to grab these files from the NPM repo. See Step XXXX in the readme.
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
add_header Strict-Transport-Security "max-age=63072000;includeSubDomains; preload" always;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
# Logging by NPM.
access_log /data/logs/proxy-host-15_access.log proxy;
error_log /data/logs/proxy-host-15_error.log warn;
# Feel free to re-map these log files to the path of your choosing.
# Most commonly, the logs path on a Linux system /var/log/nginx/
include /config/nginx/snippets/authelia-location.conf;
# For some reason, with my adv conf, I need the full path in the container
# Default /snippets, but my full pwd in container is /config/nginx/snippets
# This next section was added via the "Advanced" tab in NPM.
# If you've added any additional advanced blocks, ensure you move them to the appropriate location in NGNIX.
location / {
include /config/nginx/snippets/proxy.conf;
include /config/nginx/snippets/authelia-authrequest.conf;
proxy_pass $forward_scheme://$server:$port;
}
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}