Code: Alles auswählen
apt-get install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip php7.3-bcmath php7.3-intl php7.3-gmp php-imagick -y
Code: Alles auswählen
nano /etc/php/7.3/apache2/php.ini
Code: Alles auswählen
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
date.timezone = Europe/Berlin
Code: Alles auswählen
systemctl start apache2
systemctl start mariadb
systemctl enable apache2
systemctl enable mariadb
Code: Alles auswählen
mysql -u root -p
Code: Alles auswählen
CREATE DATABASE nextclouddb;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'PASSWORD';
Code: Alles auswählen
GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';
Code: Alles auswählen
FLUSH PRIVILEGES;
EXIT;
Code: Alles auswählen
wget https://download.nextcloud.com/server/releases/nextcloud-XX.0.XX
unzip nextcloud-xx.0.xx.zip.zip
Code: Alles auswählen
mv nextcloud /var/www/html/
Code: Alles auswählen
chown -R www-data:www-data /var/www/html/nextcloud/
chmod -R 755 /var/www/html/nextcloud/
Code: Alles auswählen
nano /etc/apache2/sites-available/nextcloud.conf
Code: Alles auswählen
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud.example.com
Alias /nextcloud "/var/www/html/nextcloud/"
<Directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Code: Alles auswählen
a2ensite nextcloud.conf
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
Code: Alles auswählen
systemctl restart apache2
Code: Alles auswählen
apt-get install python-certbot-apache -y
Code: Alles auswählen
certbot --apache -d sub.example.com