International-Data-Spaces-Association / omejdn-daps

Open Source implementation of the Dynamic Attribute Provisioning Service based on http://github.com/Fraunhofer-AISEC/omejdn-server
Apache License 2.0
5 stars 10 forks source link

Port 443 allocated #19

Closed jfernandezsqs closed 2 years ago

jfernandezsqs commented 2 years ago

I have deployed the DAPS with HTTPS using the following nginx.conf file

worker_processes 1; events { worker_connections 1024; } http { server { listen 443 ssl; ssl_certificate /etc/cert/omejdn.crt; ssl_certificate_key /etc/cert/omejdn.key;

Infomodel-based API

location / { proxy_pass http://omejdn-server:4567/; } } server { listen 80; location / { return 301 https://$host$request_uri; } } }

I have the port 443 already allocated by another nginx.

WARNING: Host is already in use by another container ERROR: for omejdn Cannot start service nginx-proxy: driver failed programming external connectivity on endpoint omejdn (e1eb907aee53abfe5c1db6a168d8c32f1b8f4db0773c781507ed6f976e44a209): Bind for 0.Creating omejdn-server ... done ERROR: for nginx-proxy Cannot start service nginx-proxy: driver failed programming external connectivity on endpoint omejdn (e1eb907aee53abfe5c1db6a168d8c32f1b8f4db0773c781507ed6f976e44a209): Bind for 0.0.0.0:443 failed: port is already allocated ERROR: Encountered errors while bringing up the project.

Is there another workaround to have the DAPS with HTTPS configured?

bellebaum commented 2 years ago

You cannot (and should not) serve two NginX proxies on the same port. However, NginX is very flexible and allows you to serve different services with just one instance. Here is the relevant documentation: https://nginx.org/en/docs/http/server_names.html If you really need to use the same domain, you need to mount one service at a different path. Relevant documentation: https://nginx.org/en/docs/http/ngx_http_core_module.html#location

Closing as this is an NginX issue rather than a DAPS issue.