Hi community, i just install nextcloud on my home VPS using as base OS Ubuntu 18.04 AMD 64 version.
Im using nextcloud-13.0.5
After i complet the instalation proces Apache show this on his log:
PHP Fatal error: Uncaught Error: Call to a member function getLogger() on null in /var/www/nextcloud/index.php:73\nStack trace:\n#0 {main}\n thrown in /var/www/nextcloud/index.php on line 73
I use as reference this link below:
This is what i did
Nextcloud
1- Install LAMP
sudo apt install mc apache2 mysql-server php7.2 php7.2-ldap libapache2-mod-php* zip unzip rar unrar php7.2-intl php-imagick php7.2-xml php7.2-zip php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring php-apcu redis-server
enabling apache2 modules
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime
2-Extract nextcloud-X.zip and copy to /var/www/nextcloud
unzip nextcloud-13.0.0.zip
sudo cp -r nextcloud /var/www/nextcloud
3-Asign recursive permisions to www-data on folder /var/www/nextcloud
sudo chown www-data:www-data -R /var/www/nextcloud
sudo chmod 775 -R /var/www/nextcloud
4-Creating Virtual Host for Nextcloud
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/nextcloud.conf
redirect to ssl vhost using this directive
Redirect / https://nextcloud.vps.cu/
sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/nextcloud-ssl.conf
change line DocumentRoot and set DocumentRoot /var/www/nextcloud
enabling vhost using
sudo a2ensite nexcloud.conf
sudo a2ensite netxcloud-ssl.conf
copy config.sample.php and create config.php
cp /var/www/nextcloud/config/config.sample.php /var/www/nextcloud/config/config.php
edit /var/www/nextcloud/config/config.php and set this values
'versions_retention_obligation' => 'auto', 3,
'check_for_working_htaccess' => true,
'has_internet_connection' => false,
'loglevel' => 2,
'enable_previews' => true,
'preview_max_x' => 2148,
'preview_max_y' => 2148,
'preview_max_filesize_image' => 50,
'memcache.local' => '\OC\Memcache\APCu',
'redis' => array(
'host' => 'localhost',
'port' => 6379,
),
'default_language' => 'es',
'force_language' => 'es',
'skeletondirectory' => '',
5-Creating Database
Entering MYSQl:
sudo mysql -u root -p
Creating database
create database nxc;
create user ‘next’@’%’ identified by ‘123’;
GRANT ALL PRIVILEGES ON nxc.* TO next@’%’ IDENTIFIED BY ‘123’;
quit;
6- Enabling on /etc/php/7.0/apache2/php.ini the following options
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
7-Creating, instaling and enabling my own certificate
openssl genrsa -out nxc.key 1024
openssl req -new -key nxc.key -out nxc.csr
openssl x509 -req -days 36500 -in nxc.csr -signkey nxc.key -out nxc.crt
sudo cp nxc.crt /etc/ssl/certs/nxc.crt
sudo cp nxc.key /etc/ssl/certs/nxc.key
sudo nano /etc/apache2/sites-avaliable/snextcloud.conf
Replace lines 33 and 34, then set tha values
SSLCertificateFile /etc/ssl/certs/nxc.crt
SSLCertificateKeyFile /etc/ssl/certs/nxc.key
Enable apache ssl module
sudo a2enmod ssl
8- Restart Apache2
sudo systemctl restart apache2
Please, forgive my english, its notmy native language.