SSL with openssl made everything stop working

jeremyy44

Member
Joined
Jan 20, 2021
Messages
45
Reaction score
8
Credits
425
So basiclky yesterday I tried to use a self signed ssl using openssl but since creating it using the command

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt

most of myy things like nextcloud and cockpit are not working anymore so I would like to deactivate the ssl certificate but couldnt find anything online to help me.
Could someone help me with this?
Im on Ubuntu Server 20.04
 


What do you mean not working anymore, what happens when you go to your website now, maybe share a screenshot of what you see? What were you using before you installed the self signed key and certificate?
 
This is what happen when trying with nextcloud with both my second nic ip adresse which is what I mainly use and my main ip adresse.
And same thing with cockpit
 

Attachments

  • Nextg.PNG
    Nextg.PNG
    29.6 KB · Views: 307
What does your apache vhost configuration look like for nextcloud?
 
I didnt use apache to setup nextcloud in fact apache isnt installed on my box.
The problems all started with the ssl command which brought what I explained earlyer.
But if even without apache installed I can acces that file im not sure how.
 
I was assuming you were using apache because apache being in the cert and key name the only thing that command did was generate a key and created a self signed certificated. If that happened to be the same name of an already existing certificate and key that command will have over written it and you will need to restore the original files from a backup.
 
Alright and what if I dont have a backup of these file?
BEcause its the first time I ever used a ssl and all I did was create it with the command I didnt even configure any of my services to use it.
So idk if I even had a old file with that same name
 
If you weren't using an ssl configuration before in your website it's not all of a sudden going to be activated with that command because it needs to be configured for each website separately. What does your webserver configuration look like? Also what are do messages are you getting in your webserver's nextcloud log files?
 
Well for some reason turns out cockpit was uninstalled and many more services were too like snapd for exemple had to reinstall them so I guess Nextcloud was too.
Yesterday I tried to apt remove openssl in hope that it would remove the ssl and the after that is when it all stopped working could uninstalling open ssl remove a bunch a services?
 
Was nextcloud installed using snapd?
 
It was yeah which it why I assumed it wasnt using apache because that also wasnt installed but now that I think about it its a bit dumb to assume
 
I have no experience with snaps so can't help you with that but maybe someone else can. So the situation is you ran that command, your nextcloud and other websites stopped working. Then you found out snapd, cockpit and other services had been removed(probably because they too were snaps?), then you reinstalled them and now you are getting an error message("Connection refused" when you try to reach your nextcloud website?
 
Yeah well actually I was getting the error message becaus eeverything was uninstalled for idk what reason but now I reinstalled everything and it seems to be going ok the only thing is my nextcloud directory was erase same with all the plugins so basicly a fresh install but aside from that it seems to be working
 
I looked up how installing nextcloud using snaps works, it seems you have to use special commands to either use a self signed or letsencrypt certificate.
Code:
sudo nextcloud.enable-https self-signed
sudo nextcloud.enable-https lets-encrypt
My guess the same may go for other snaps or something like that, I would look up to see if you can find any other information about setting up ssl for those snaps. That's the only advice I can give, hope that helps ;) If not maybe someone else on the forums that has experience with snaps will be able to help you out.
 

Members online


Top