|
|
@@ -62,26 +62,21 @@ journalctl -u pps -f # startup + request logs (also in /opt/pps-quarant
|
|
|
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080/login # -> 200
|
|
|
```
|
|
|
|
|
|
-## Reverse proxy (TLS)
|
|
|
-
|
|
|
-Terminate TLS at nginx/Caddy and proxy to `127.0.0.1:8080`. Make sure the Okta
|
|
|
-`redirect_uri` matches the public HTTPS URL exactly (e.g.
|
|
|
-`https://pps.internal.example.com/authorize`). Minimal nginx:
|
|
|
-
|
|
|
-```nginx
|
|
|
-server {
|
|
|
- listen 443 ssl;
|
|
|
- server_name pps.internal.example.com;
|
|
|
- ssl_certificate /etc/ssl/pps.crt;
|
|
|
- ssl_certificate_key /etc/ssl/pps.key;
|
|
|
- location / {
|
|
|
- proxy_pass http://127.0.0.1:8080;
|
|
|
- proxy_set_header Host $host;
|
|
|
- proxy_set_header X-Forwarded-Proto https;
|
|
|
- }
|
|
|
-}
|
|
|
+## Reverse proxy (nginx + TLS)
|
|
|
+
|
|
|
+A ready-made site config is in [`pps.nginx.conf`](pps.nginx.conf) — it terminates TLS and
|
|
|
+`proxy_pass`es to `127.0.0.1:8080`. Edit the `server_name` and `ssl_certificate*` paths, then:
|
|
|
+
|
|
|
+```bash
|
|
|
+sudo cp deploy/pps.nginx.conf /etc/nginx/sites-available/pps
|
|
|
+sudo ln -s /etc/nginx/sites-available/pps /etc/nginx/sites-enabled/pps
|
|
|
+sudo nginx -t && sudo systemctl reload nginx
|
|
|
```
|
|
|
|
|
|
+Make sure the Okta `redirect_uri` matches the public HTTPS URL exactly (e.g.
|
|
|
+`https://pps.internal.example.com/authorize`), and set `[app] cookie_secure = true` and
|
|
|
+`listen = "127.0.0.1"` in `config.toml`.
|
|
|
+
|
|
|
## Day-to-day
|
|
|
|
|
|
```bash
|