after i add ssl ( port 80 and port 443 )i go to https://www.The example.com/ it give (Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. Further configuration is required. For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com. Thank you for using nginx.)
and http://www.The example.com/ go to (Success!The example .com server block is working!)
please advise
i go through https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @iot,
It seems to me like you don’t have a Nginx config listening for port 443 for your domain.
Usually, Let’s Encrypt should create that automatically for you and the config should be found at /etc/nginx/sites-available. Go there and see if you can spot an SSL config for your domain theexample.com.
If you can’t create a new config following the same pattern from the https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04#step-5-setting-up-server-blocks-recommended tutorial. The config should look like this:
Once you create the config, follow the other steps in the mentioned tutorial to finish the setup.