1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 14:50:45 +01:00

Add NGINX SSL sample config

This commit is contained in:
Daniel McNally 2018-11-27 17:55:44 -05:00
parent 09725e8615
commit e446693c4c
No known key found for this signature in database
GPG key ID: 2D510757156F5E75

View file

@ -87,6 +87,28 @@ $ hitch --backend=[127.0.0.1]:50001 --frontend=[127.0.0.1]:50002 pem_file
$ electrum --oneserver --server=127.0.0.1:50002:s
```
You can also use [NGINX as an SSL endpoint](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-tcp/#) by placing the following block in `nginx.conf`.
```nginx
stream {
upstream electrs {
server 127.0.0.1:50001;
}
server {
listen 50002 ssl;
proxy_pass electrs;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 4h;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
}
}
```
## Docker
```bash
$ docker build -t electrs-app .