-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkgserver.nginx.conf
27 lines (23 loc) · 1.14 KB
/
pkgserver.nginx.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
# Setup logging to include request time and bytes sent, and telemetry headers (if present)
log_format pkgserver_logformat '$remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_user_agent" $request_time $http_julia_version $http_julia_system "$http_julia_ci_variables" $http_julia_interactive "$http_julia_pkg_server"';
upstream pkgservers {
server pkgserver1:8000;
server pkgserver2:8000;
}
server {
listen 443 ssl http2;
server_name ${PKG_SERVER_FQDN};
ssl_certificate /etc/letsencrypt/live/${PKG_SERVER_FQDN}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${PKG_SERVER_FQDN}/privkey.pem;
# Pass all traffic off to pkgserver:8000
location / {
proxy_pass http://pkgservers;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
access_log /logs/access_${PKG_SERVER_FQDN}.log pkgserver_logformat buffer=4k flush=1m;
error_log /logs/error_${PKG_SERVER_FQDN}.log;
}