NextCloudPi - Stupidly purged apache2

This utter noob messed up following a misunderstood online guide, and not just uninstalled apache2 but erased it - I had configured backups from the web panel but haven’t a clue how to roll back the apache2 files I need.
I only use it as a home cloud server and do almost everything via the NextCloudPi web interface but can follow basic Unix commands.
This idiot would appreciate any help…

Does the web interface allow to install software packages? Just reinstall apache2 and related packages. Otherwise, you have to dig into the CLI, that gives you more options anyway.

sudo apt install --reinstall apache2

should get you started. Does your backup contain the files in /etc/apache2 ? Just restore them.

What do you mean by “erased it”, btw? What directories did you delete?

Sorry, I meant purged.
sudo apt purge apache2
I have access via putty but that’s it - and I don’t know where the system backups are kept, what format they’re in, or how to access them.
Yes, I’m feeling pretty stupid right now.

Well, putty means you have CLI access. That should be all you need. Reinstall apache, as suggested above.

As for the backup, try to learn about the NextCloudPi. I cant help you with this, I do everything on the command line.

As @eehmke says, unless you have a backup, you’re going to need to reinstall apache2 and set up the config files from scratch;

Just adapt working apache configs, and you should be back in business asap :slight_smile:

1 Like

Hint for the future: when you “purge” a packege (what you seem to have done) everything gets deleted. When you just “remove” a package, only the software gets deleted and the config files stay where they are for later use.

Thanks, I suspect that with my lack of networking and Ubuntu knowledge that the actual configuration might be beyond me and it might be simpler (and less frustrating) to just install NextCloudPi again from scratch - but I’ll give it a go first.
Also I have family visiting today for the rest of the week and they wouldn’t appreciate me sat tapping away… :nerd_face::wink:

I know, it’s typical that I go for the nuclear option and aim the missiles at myself.

1 Like