Yourls URL Shorter unter Linux installieren

apt install lamp-server^
mysql
CREATE DATABASE yourls; 
CREATE USER 'yourlsuser'@'localhost' IDENTIFIED BY 'password_here';
GRANT ALL PRIVILEGES ON yourls.* TO 'yourlsuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
apt install git
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>
a2ensite yourls.conf
service apache2 restart 
http://domain.com/admin
chmod 0600 /var/www/yourls/user/config.php
apt install certbot python3-certbot-apache

certbot --apache -m master@domain.com -d cloud.domain.com