CREATE USER 'yourlsuser'@'localhost' IDENTIFIED BY 'password_here';
GRANT ALL PRIVILEGES ON yourls.* TO 'yourlsuser'@'localhost';
cd /var/www/
git clone https://github.com/YOURLS/YOURLS.git
mv YOURLS yourls
cd yourls/user
cp config-sample.php config.php
nano config.php
chown -R www-data:www-data /var/www/yourls
chmod -R 775 /var/www/yourls
nano /etc/apache2/apache2.conf
Change the: AllowOverride None to AllowOverride All
a2enmod rewrite
nano /etc/apache2/sites-available/yourls.conf
<VirtualHost *:80>
ServerName short.domain.com
DocumentRoot "/var/www/yourls"
<Directory "/var/www/yourls">
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
chmod 0600 /var/www/yourls/user/config.php
apt install certbot python3-certbot-apache
certbot --apache -m master@domain.com -d cloud.domain.com