Ich schreibe Anleitungen die dir helfen können Dinge umzusetzen.
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
Falls du deine Nextcloud hinter einem ReverseProxy einrichten willst musst du in der Config ein par Sachen anpassen bzw einfügen.
Gehe zunächst in die Nextcloud Config
nano /var/www/Nextcloud/config/config.php
'trusted_proxies' =>
array (
0 => 'IP deines Proxys',
),
'overwritehost' => 'cloud.meine.domain',
'overwrite.cli.url' => 'https://cloud.meine.domain',
'overwriteprotocol' => 'https',
Ich wollte meinen Nextcloud Speicher auf mein NAS umziehen.
Bedeutet die Nextcloud läuft weiterhin auf einer VM nur die Hochgeladenen Dateien sollen auf dem NAS liegen.
Inhalt
Als erstes musst du einen neuen User auf deinem NAS erstellen.
Gehe hierfür in den fstab
nano /etc/fstab
//IP-Adresse_vom_NAS/Freigabe_Ordner /mountpoint_Verzeichniss cifs username=Username_vom_NAS,password=Passwort_vom_NAS,uid=33,gid=33 0 0
ln -s /Pfad/zum/MountPoint /Pfad/zum/symlink /Pfad/zum/Systemlink
chown -R www-data:www-data /Pfad/zum/Systemlink
chmod -R 755 /Pfad/zum/Systemlink