You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon I am working with ngnix as a reverse proxy, and with spring boot to develop api rest, all raising with docker, the question is that I need to work with secure https, for which I create my self-signed certificates as detailed below:
Internally (not on the host) I am exposing the containers by port 8080, as seen in the yml file, I don't know if this can be done to configure ssl, or if app2 should expose it on port 8081, for example, they would like help me clarify that.
Inside the nginx-conf.d folder I have my app.conf file, which is in the volume defined in my docker-compose yml file:
app.conf
server {
listen *:80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl on; ssl_certificate /certs/myssl.crt;
ssl_certificate_key /certs/myssl.key;
}
My containers raised
All good so far, but when I am going to test the api rest in postman, with the container that rises on port 37006 everything is fine with https, but with the port that rises on port 37007 I cannot use https:
HTTPS Ok (37006)
Bad HTTPS (37007)
What am I doing wrong?
I am not using domain, in my company the api are handled as I show, using the POST method always
Should I generate a certificate for each application individually?
Should I expose my app2 application on port 8081, example?
I'm totally new to ngnix and I couldn't find a solution to this problem
The text was updated successfully, but these errors were encountered:
Good afternoon I am working with ngnix as a reverse proxy, and with spring boot to develop api rest, all raising with docker, the question is that I need to work with secure https, for which I create my self-signed certificates as detailed below:
Prepare my certificates with openssl:
My directory where is my applications and docker-compose yml file:
My Docker Compose:
Internally (not on the host) I am exposing the containers by port 8080, as seen in the yml file, I don't know if this can be done to configure ssl, or if app2 should expose it on port 8081, for example, they would like help me clarify that.
Inside the nginx-conf.d folder I have my app.conf file, which is in the volume defined in my docker-compose yml file:
app.conf
My containers raised
All good so far, but when I am going to test the api rest in postman, with the container that rises on port 37006 everything is fine with https, but with the port that rises on port 37007 I cannot use https:
HTTPS Ok (37006)
Bad HTTPS (37007)
What am I doing wrong?
I am not using domain, in my company the api are handled as I show, using the POST method always
Should I generate a certificate for each application individually?
Should I expose my app2 application on port 8081, example?
I'm totally new to ngnix and I couldn't find a solution to this problem
The text was updated successfully, but these errors were encountered: