Fix security and setup warnings
Last updated
Last updated
#Switch the following directory to change the php memory limit
cd /etc/php/7.4/apache2/
#Edit the php.ini file
sudo nano php.ini
#After that restart the service apache2
sudo service apache2 restart
#Switch to the following directory to enable caching and set your phone-region
cd /var/www/nextcloud/config
#Edit the config.php file
sudo nano config.php
#Switch to the following directory to make some furthermore changes
cd /var/www/nextcloud
#Update .htaccess
sudo -u www-data php occ maintenance:update:htaccess
#Switch to the following directory to make some furthermore changes
cd /etc/apache2/sites-vailable
#Edit the 000-default.conf file
sudo nano 000-default.conf
#Paste the following code into the file (take a look at the picture below)
RewriteEngine On
RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/host-meta https://%{SERVER_NAME}/public.php?service=host-meta [QSA,L]
RewriteRule ^/\.well-known/host-meta\.json https://%{SERVER_NAME}/public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/webfinger https://%{SERVER_NAME}/public.php?service=webfinger [QSA,L]
#Tell the system to rewrite a2enmod
sudo a2enmod rewrite
#Restart the apache2 service
sudo service apache2 restart
#Uninstall all packages from imagemagick
sudo apt remove imagemagick-6-common
#Remove php-imagick
sudo apt remove php-imagick
#Remove non-used packages
sudo apt autoremove
#Install php-imagick and imagemagick
sudo apt install php-imagick imagemagick
#Restart the apache2 service
sudo service apache2 restart