A collection of scripts for setting up various items / running tasks on serverpilot provisioned servers
THIS SCRIPT IS TO BE RUN ENTIRELY AT YOUR OWN RISK
WE ARE NOT RESPONSIBLE FOR LOSS OF DATA OR ANY OTHER BAD THINGS THAT MAY HAPPEN AS A RESULT OF RUNNING THIS SCRIPT
- ssh into your serverpilot server e.g.
ssh [email protected]
- Login as root
su
(important: do not skip) - Run script from GitHub
bash <(curl -s https://raw.githubusercontent.com/webdna/serverpilot-scripts/master/serverpilot-scripts.sh)
- The script will prompt asking you if you would like to run each part as listed below.
- LEMP Stack (Nginx Only, No Apache)
- AutoMySQLBackup
- Imagick
- Disable MySQL (5.7) Strict Mode
- Image Optimisation Libraries
- Password Protect
- Nginx Expires Config
If your app doesn't utilize .htaccess files, it is possible to have Nginx interact directly with PHP-FPM and bypass Apache entirely.
https://serverpilot.io/community/articles/how-to-create-a-lemp-stack-only-nginx-no-apache.html
MySQL provides a command line utility, mysqldump, for exporting databases as raw SQL. Instead of running mysqldump manually, you can install a script that will automatically run mysqldump every day on all of your databases. One of the most popular of these scripts is automysqlbackup.
https://serverpilot.io/community/articles/how-to-back-up-mysql-databases-with-automysqlbackup.html
The ImageMagick extension supports PHP 5.4, 5.5, 5.6, 7.0, and 7.1.
https://serverpilot.io/community/articles/how-to-install-the-php-imagemagick-extension.html
If your app was written for older versions of MySQL and is not compatible with strict SQL mode in MySQL 5.7, you can disable strict SQL mode. For example, apps such as WHMCS 6 and Craft 2 do not support strict SQL mode.
https://serverpilot.io/community/articles/how-to-disable-strict-mode-in-mysql-5-7.html
Installation of the following image optimisation libraries:
- gifsicle
- jpegoptim
- optipng
- pngcrush
- pngquant
- webp
Ability to add Auth Basic to apps with in serverpilot. This is setup within the nginx app config so will work with both people using nginx + apache and nginx only
Adds in an Nginx config containing expires headers. The config file is based on the HTML 5 boilerplate nginx configs
- nginx bad bots
- Image optimisation libraries
- jpegoptim
- mozjpeg
- optipng
- pngcrush
- pngquant
- gisicle
- webp
- MariaDB Installation
- Password protect apps
- Nginx expires config