Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS Not Sure and unsafe issue with URL #1806

Open
linkzeeshan opened this issue May 17, 2024 · 27 comments
Open

HTTPS Not Sure and unsafe issue with URL #1806

linkzeeshan opened this issue May 17, 2024 · 27 comments

Comments

@linkzeeshan
Copy link

Can you guide me how can I resolve https not secure issue. SSL is registered on my domain. but still not secure issue is coming.

I purchased VM on Azure and domain purchase to another platform.

@saghul
Copy link
Member

saghul commented May 17, 2024

What public URL are you using?

@linkzeeshan
Copy link
Author

linkzeeshan commented May 17, 2024

Public URL currently I am using domain name like PUBLIC_URL = https://(domain name)

@saghul
Copy link
Member

saghul commented May 17, 2024

Test your domain here: https://whatsmychaincert.com/

@linkzeeshan
Copy link
Author

Please check screenshot.

meet2.medchois.com is self-signed. It doesn't have a chain certificate and will never be trusted by clients.

image

@damencho
Copy link
Member

Have you enable the 3 let's encrypt settings?

#ENABLE_LETSENCRYPT=1

@linkzeeshan
Copy link
Author

linkzeeshan commented May 17, 2024

damencho I checked this #ENABLE_LETSENCRYPT=1 It was commented.

I uncommented now page is not loading please check below screenshot
image

@saghul
Copy link
Member

saghul commented May 17, 2024

Check the web container logs.

@damencho
Copy link
Member

damencho I checked this #ENABLE_LETSENCRYPT=1 It was commented.

You also need the following two, the domain and email.

@linkzeeshan
Copy link
Author

linkzeeshan commented May 17, 2024

saghul damencho All done but still same issue is coming

let me try to explain you what I am doing

1- site is working once I set below configuration

PUBLIC_URL = https://IP-address
ENABLE_LETSENCRYPT, domain and email. all option are commented

2- site not working once I enable below following options
ENABLE_LETSENCRYPT = 1
LETSENCRYPT_DOMAIN=domain name
LETSENCRYPT_EMAIL= email

@damencho
Copy link
Member

PUBLIC_URL = https://IP-address
This should be https://domain name.

You should have a valid DNS for that domain name in order Let's Encrypt to reach your server and allow you to have valid certificates, it also needs port 80 to be accessible on your deployment.
As Saul said you can see more information on what went wrong with the certificates in the logs of the container.

@linkzeeshan
Copy link
Author

linkzeeshan commented May 20, 2024

Thanks.
saghul damencho I assigned PUBLIC_URL Value is my domain name https://domain/

Please check below log SC.

image

@linkzeeshan
Copy link
Author

image

@saghul
Copy link
Member

saghul commented May 20, 2024

Is the domain DNS pointing at the correct IP address and are ports 80 and 443 forwarded to the docker host?

@linkzeeshan
Copy link
Author

linkzeeshan commented May 20, 2024

saghul Yes! both are activated

@saghul
Copy link
Member

saghul commented May 20, 2024

Please share the full .env file.

@linkzeeshan
Copy link
Author

linkzeeshan commented May 20, 2024

saghul Please find attached screens shot
image

@saghul
Copy link
Member

saghul commented May 20, 2024

Is your public URL correct in your file?

On a previous screenshot I noticed you are running Docker as root. Don't, use a regular user please.

Even if LE fails, are you able to access the site over plain http?

@linkzeeshan
Copy link
Author

No! It's not working with plain http as well.

PUBLIC_URL = htpps://meet2.medchois.com

@damencho
Copy link
Member

Are you sure the ports are forwarded correctly and the traffic from the public IP reaches the running docker?

@linkzeeshan
Copy link
Author

Yes! I have already opened the inbound connection, and the site is functioning properly once I set the value of PUBLIC_URL as the VM IP and commented out the other keys listed below:

ENABLE_LETSENCRYPT = 1
LETSENCRYPT_DOMAIN = domain name
LETSENCRYPT_EMAIL = email

I also completed the DNS configuration for the domain name.

@saghul
Copy link
Member

saghul commented May 21, 2024

Hum, so it only fails when you enable let's encrypt?

Try this: put the domain in there and leave let's encrypt disabled. Does the site work, albeit with the cert error?

@linkzeeshan
Copy link
Author

linkzeeshan commented May 21, 2024

Yes saghul, the application functioning correctly with the configuration set as follows:

PUBLIC_URL = https://VM IP
ENABLE_LETSENCRYPT = disabled

However, I encountered an issue when enabling LETSENCRYPT and changing the PUBLIC_URL to https://domain/. The application is not working in this configuration.

@saghul
Copy link
Member

saghul commented May 21, 2024

That's not what I asked. Try this:

PUBLIC_URL = https://domain
ENABLE_LETSENCRYPT = disabled

I suspect your domain is not pointing to the right IP.

@linkzeeshan
Copy link
Author

linkzeeshan commented May 21, 2024

@saghul Domain is pointing my VM public IP address.

@damencho
Copy link
Member

@saghul Domain is pointing my VM public IP address.

And that same IP address that you see when you do ping domain and when you put it in PUBLIC_URL = https://vm_IP it works?

@linkzeeshan
Copy link
Author

Yes!

@damencho
Copy link
Member

So then the ports are not forwarded from the public IP to the vm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants