Make sure you cleaned out your browser cache. Browsers remember which protocol it used first time, and will use it every next time until some point. To make it see changes now - clean cache.
If that doesn’t help, check your nginx config. Let’s say before removing you had this Server blocks:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include snippets/ssl-example.com.conf;
include snippets/ssl-params.conf;
root /var/www/html;
server_name example.com www.example.com;
...
location / {
...
}
location ~ /.well-known {
allow all;
}
...
}
What you need to do, remove first server block, one which is listening on port 80. In second one which listens on port 443 do the following:
- Change
listen 443 ssl http2 default_server;
to listen 80 default_server;
.
- Change
listen [::]:443 ssl http2 default_server;
to listen [::]:80 default_server;
.
- Remove next two
include
directives.
You can remove location ~ /.well-known
too.
After this changes, you have something like this:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
server_name example.com www.example.com;
...
location / {
...
}
...
}
Save changes and run nginx to make sure everything is correct:
If everything is OK, restart nginx to make changes in effect:
- sudo systemctl restart nginx
Clean browser cache once again, try another browser or use Incognito mode and try to access site.
my mistake, I used this:
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
also do note that the site doesn’t load now.