How to reinstall hestia php? (deleted by mystake)

Hey…

I did a big mistake, I wanted to remove only php redis (because for some reason when I have it my wordpress backend is loading in 10 seconds (analyzed with Query Monitor) and without it it’s 1 second, so I asked chatgpt for a command that I copy/pasted which deleted php…

sudo apt-get remove php8.3 php8.3-common

But now even if I reinstall php, it seems that it isn’t loaded, so I think hestiacp might have its own version of php?

Is there a way to re download it?

Thanks in advance!

Note: If i do v-add-web-php 8.3 I get this:

W: An error occurred while verifying the signature. The repository is not updated and previous index files will be used. GPG error: https://nginx.org/packages/mainline/ubuntu jammy InRelease: The following signatures are invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <[email protected]>
W: Unable to recover https://nginx.org/packages/mainline/ubuntu/dists/jammy/InRelease The following signatures are invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <[email protected]>
W: Some index files failed to download, were skipped, or old ones were used instead.
Installing PHP-8.3, please wait...

Which ends up with php installed but nginx won’t launch

To solve the issue with nginx repo:

curl -s https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor > /usr/share/keyrings/nginx-keyring.gpg

You should check why nginx doesn’t start.

systemctl status nginx --no-pager -l
1 Like

I which to be as good as you are one day, you really have an answer for everything haha, thank you so much!

I got this:

sept. 09 07:06:23 mypaneldomain systemd[1]: Starting nginx - high performance web server...

sept. 09 07:06:24 mypaneldomain nginx[823]: nginx: [emerg] bind() to vpsip:80 failed (98: Address already in use)

sept. 09 07:06:25 mypaneldomain nginx[823]: nginx: [emerg] bind() to vpsip:80 failed (98: Address already in use)

sept. 09 07:06:25 mypaneldomain nginx[823]: nginx: [emerg] bind() to vpsip:80 failed (98: Address already in use)

sept. 09 07:06:26 mypaneldomain nginx[823]: nginx: [emerg] bind() to vpsip:80 failed (98: Address already in use)

sept. 09 07:06:26 mypaneldomain nginx[823]: nginx: [emerg] bind() to vpsip:80 failed (98: Address already in use)

sept. 09 07:06:27 mypaneldomain nginx[823]: nginx: [emerg] still could not bind()

sept. 09 07:06:27 mypaneldomain systemd[1]: **nginx.service: Control process exited, code=exited, status=1/FAILURE**

sept. 09 07:06:27 mypaneldomain systemd[1]: **nginx.service: Failed with result 'exit-code'.**

sept. 09 07:06:27 mypaneldomain systemd[1]: **Failed to start nginx - high performance web server.**

Edit: Ohh I see it was apache that got installed with php for some reason, I removed it with sudo apt-get remove apache2, hope it’s ok because I now get “Bad gateway” haha :frowning:

Edit 2 : Okay rebuilding all the the web domains seems to have done it! I’m almost done, there is just fail2ban that won’t launch and everything is good haha

The same as nginx:

systemctl status fail2ban --no-pager -l

And also you can check the last lines of log file /var/log/fail2ban.log

1 Like

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