File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,34 @@ networks:
169169Create a `nginx.conf` file in the `docker-compose.yaml` folder and mount it to `etc/nginx/conf.d/default.conf` :
170170
171171` ` ` conf
172- { { file.examples/nginx/nginx.conf } }
172+ server {
173+ # Allow SSL on Port 443
174+ listen 443 ssl;
175+
176+ # Add allowed hostnames which nginx should respond to
177+ # ` _` for any
178+ server_name localhost;
179+
180+ ssl_certificate /etc/nginx/ssl/cert.crt;
181+ ssl_certificate_key /etc/nginx/ssl/cert.key;
182+
183+ location / {
184+ # Use whatever network alias you set in the docker-compose file
185+ proxy_pass http://secured-signal-api:8880;
186+ proxy_set_header Host ;
187+ proxy_set_header X-Real-IP ;
188+ proxy_set_header X-Forwarded-For ;
189+ proxy_set_header X-Forwarded-Host ;
190+ proxy_set_header X-Fowarded-Proto ;
191+ }
192+ }
193+
194+ # Redirect HTTP to HTTPs
195+ server {
196+ listen 80;
197+ server_name localhost;
198+ return 301 https://;
199+ }
173200```
174201
175202Lastly add your ` cert.key ` and ` cert.crt ` into your ` certs/ ` folder and mount it to ` /etc/nginx/ssl ` .
You can’t perform that action at this time.
0 commit comments