Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### Install YOURLS Ubuntu 20.04 ####
- ## install LAMP stack ##
- apt install lamp-server^
- # open SQL dialoge
- mysql
- # create database calles nextcloud
- CREATE DATABASE yourls;
- # create database user with password
- CREATE USER 'yourlsuser'@'localhost' IDENTIFIED BY 'password_here';
- #grant accesss to databse
- GRANT ALL PRIVILEGES ON yourls.* TO 'yourlsuser'@'localhost';
- #save changes and exit
- FLUSH PRIVILEGES;
- EXIT;
- ## get YOURLS ##
- apt install git
- cd /var/www/
- git clone https://github.com/YOURLS/YOURLS.git
- mv YOURLS yourls
- ## configure YOURLS ##
- cd yourls/user
- cp config-sample.php config.php
- nano config.php
- ## adjust permissions ##
- chown -R www-data:www-data /var/www/yourls
- chmod -R 775 /var/www/yourls
- ## adjust apache settings ##
- nano /etc/apache2/apache2.conf
- Change the: AllowOverride None to AllowOverride All
- ## enable apache module ##
- a2enmod rewrite
- ## add vHost ##
- 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>
- ## enable site ##
- a2ensite yourls.conf
- ## restart apache ##
- service apache2 restart
- ## browse WebGUI ##
- http://domain.com/admin
- ## adjust config permissions ##
- chmod 0600 /var/www/yourls/user/config.php
- ## get free Let's Encrypt SSL Zertifikate ##
- apt install certbot python3-certbot-apache
- certbot --apache -m [email protected] -d cloud.domain.com
Advertisement
Add Comment
Please, Sign In to add comment