Error: Connection refused on HTTPS with Let's Encrypt SSL, apache

I’m trying to enable Let’s Encrypt ssl certificate on jammetti.lv (apache, raspbian buster) but when I force SSL connection and try to load the website connection to the website is refused.

I’ve also checked if my SSL certificates are valid.

I’ve made sure my SSL port is open on router.

My DNS server is mydomain.com and I didn’t add any specific DNS record for SSL connection.

I’ve been trying to fix this problem for several days now.

Thanks,

Pavels

https://jammetti.lv/ loads fine for me. Perhaps you just need to clear your browser cookies?

I’ve still got some strange (or missing) redirects:

http://www.jammetti.lv/ --302--> http://jammetti.lv/

https://www.jammetti.lv/` --302--> `https://jammetti.lv/

These should be:

http://jammetti.lv/ --301--> https://jammetti.lv/

http://www.jammetti.lv/ --301--> https://www.jammetti.lv/ --301--> https://jammetti.lv/

I’ve asked a friend to load the website from different IP and the website was secure and fully functional. But I still can’t get it to work on my PC. Website doesn’t load. That’s odd. Website works fine for others except me. I’ve cleared cache & cookies and even tried different browser. Of Course I should fix the redirect issue, but I don’t know where to begin. What would you suggest?

.htaccess file:

/etc/apache2/sites-enabled/000-default.conf:
80 vHost

<VirtualHost *:80>

	ServerAdmin [email protected]
	DocumentRoot /var/www/html
	ServerName jammetti.lv


	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

And here is
443 vHost:

<IfModule mod_ssl.c>
<VirtualHost *:443>

	ServerAdmin [email protected]
	DocumentRoot /var/www/html

	

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined



ServerName jammetti.lv
SSLCertificateFile /etc/letsencrypt/live/jammetti.lv/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/jammetti.lv/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

You shouldn’t need to manually touch your .htaccess or vhosts configurations to debug this issue. You might find that simply adding “s” to your Base URL will resolve the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.