Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josefglatz/e3aefa45c5ab206d48ec9eeee11be3b4 to your computer and use it in GitHub Desktop.
Save josefglatz/e3aefa45c5ab206d48ec9eeee11be3b4 to your computer and use it in GitHub Desktop.
Plesk 17.x Cheatsheet to autostart websites after a system reboot

I used the following commands to fix stopped hosted plesk websites (with nginx reverse proxy and Apache as webserver) after a system reboot

/usr/local/psa/admin/sbin/nginxmng --disable
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Environment: Ubuntu 16.0.4; Plesk 17.0-17.5

It could be possible that it's enough to just only enable the nginx service (the plesk way)

/usr/local/psa/admin/sbin/nginxmng --enable 

If your Plesk disables httpd/nginx after (security) updates (Please do not ask why Plesk has this problem on certain servers)

Create a script with following content and add it to your crontab (root):

#!/bin/bash
if curl -s --connect-timeout 3 --max-time 5 --head  --request GET https://www.typo3blog.at/ | grep "200 OK" > /dev/null; then
   exit 0
else
   /usr/local/psa/admin/sbin/nginxmng --enable
   systemctl restart nginx.service || true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment