Create new droplet (with SSH keys)
apt install apache2
apt install mysql_server
mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>;
apt install graphicsmagick php7.4 php7.4-fpmphp7.4-curl php7.4-mysql php7.4-xml php7.4-mbstring php7.4-opcache php7.4-zip php7.4-intl php7.4-gd -y
vi /etc/php/7.4/fpm/php.ini
upload_max_filesize = 1G
post_max_size = 1G
memory_limit = 1G
max_execution_time = 1800
max_input_vars = 9000
max_input_time = 9000
a2enmod proxy_fcgi
a2enmod ssl
a2enmod rewrite
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/.well-known/
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<FilesMatch ".php$">
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
apt install certbot
add the crontab (crontab -e) and add the following line to automatically renew all certificates.
15 4 * * 1 letsencrypt renew && service apache graceful
install phpmyadmin
apt install composer
composer create-project phpmyadmin/phpmyadmin