Nextcloud 15 Internal Server Error

Hey.
I have problems getting an error right after installing Nextcloud 15.0.0. Centos7
When loading the page:
http://192.168.69.24/nextcloud/
Internal Server Error
The request cannot be processed by the server.
If this happens again, send the server administrator a detailed message about the incident below.
Detailed information can be found in the server log.
Technical details
Remote Address: 192.168.1.15
Request ID: XECCqH91InL81bMuzkiUXwAAAAY

Please tell me what is missing or what I have not done?

Here’s what’s in the logs:
/var/log/httpd/Access_log

ХвОдка

192.168.1.15 - - [17/Jan/2019:16:58:22 +0300] “GET /nextcloud/ HTTP/1.1” 500 9143 “-” “Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36”

/var/log/httpd/Error_log

ХвОдка

[Thu Jan 17 16:58:01.449333 2019] [core:notice] [pid 15022] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Jan 17 16:58:01.528312 2019] [suexec:notice] [pid 15022] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jan 17 16:58:01.597956 2019] [auth_digest:notice] [pid 15022] AH01757: generating secret for digest authentication …
[Thu Jan 17 16:58:01.599209 2019] [lbmethod_heartbeat:notice] [pid 15022] AH02282: No slotmem from mod_heartmonitor
[Thu Jan 17 16:58:06.783909 2019] [mpm_prefork:notice] [pid 15022] AH00163: Apache/2.4.6 (CentOS) PHP/7.2.14 configured – resuming normal operations
[Thu Jan 17 16:58:06.783963 2019] [core:notice] [pid 15022] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Jan 17 16:58:25.211474 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.211546 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“touch(): Unable to create file \/var\/www\/nextcloud\/config\/config.php because Permission denied at \/var\/www\/nextcloud\/lib\/private\/Config.php#240”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.211738 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.211759 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“fopen(\/var\/www\/nextcloud\/config\/config.php): failed to open stream: No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Config.php#241”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.211926 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.211946 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“chmod(): No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Config.php#244”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.643623 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.643660 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“fileperms(): stat failed for \/var\/www\/nextcloud\/data\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#140”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.643706 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:{“Exception”:“OC\\HintException”,“Message”:“Can’t write into config directory!”,“Code”:0,“Trace”:[{“file”:"\/var\/www\/nextcloud\/lib\/private\/Config.php",“line”:132,“function”:“writeData”,“class”:“OC\\Config”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/SystemConfig.php",“line”:100,“function”:“setValue”,“class”:“OC\\Config”,“type”:"->",“args”:[“instanceid”,“ocim2r56kp0b”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/legacy\/util.php",“line”:1143,“function”:“setValue”,“class”:“OC\\SystemConfig”,“type”:"->",“args”:[“instanceid”,“ocim2r56kp0b”]},{“file”:"\/var\/www\/nextcloud\/lib\/base.php",“line”:415,“function”:“getInstanceId”,“class”:“OC_Util”,“type”:"::",“args”:[]},{“file”:"\/var\/www\/nextcloud\/lib\/base.php",“line”:656,“function”:“initSession”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"\/var\/www\/nextcloud\/lib\/base.php",“line”:1068,“function”:“init”,“class”:“OC”,“type”:"::",“args”:[]},{“file”:"\/var\/www\/nextcloud\/index.php",“line”:40,“args”:["\/var\/www\/nextcloud\/lib\/base.php"],“function”:“require_once”}],“File”:"\/var\/www\/nextcloud\/lib\/private\/Config.php",“Line”:251,“Hint”:“This can usually be fixed by giving the webserver write access to the config directory. See https:\/\/docs.nextcloud.com\/server\/14\/go.php?to=admin-dir_permissions”,“CustomMessage”:"–"},“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.644251 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.644278 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“fileperms(): stat failed for \/var\/www\/nextcloud\/data\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#140”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.644306 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:{“Exception”:“Doctrine\\DBAL\\DBALException”,“Message”:“Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [14] unable to open database file”,“Code”:0,“Trace”:[{“file”:"\/var\/www\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php",“line”:992,“function”:“connect”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/DB\/Connection.php",“line”:216,“function”:“executeUpdate”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[“PRAGMA read_uncommitted = 1”,[],[]]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php",“line”:623,“function”:“executeUpdate”,“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[“PRAGMA read_uncommitted = 1”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/DB\/Connection.php",“line”:151,“function”:“setTransactionIsolation”,“class”:“Doctrine\\DBAL\\Connection”,“type”:"->",“args”:[2]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DriverManager.php",“line”:172,“function”:“construct",“class”:“OC\\DB\\Connection”,“type”:"->",“args”:[{“adapter”:“OC\\DB\\AdapterSqlite”,“driver”:“pdo_sqlite”,“wrapperClass”:“OC\\DB\\Connection”,“user”:"",“password”:"",“path”:"\/var\/www\/nextcloud\/data\/owncloud.db",“tablePrefix”:"oc",“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:"oc”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}},{“class”:“Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver”},{“class”:“Doctrine\\DBAL\\Configuration”},{“class”:“Doctrine\\Common\\EventManager”}]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/DB\/ConnectionFactory.php",“line”:158,“function”:“getConnection”,“class”:“Doctrine\\DBAL\\DriverManager”,“type”:"::",“args”:[{“adapter”:“OC\\DB\\AdapterSqlite”,“driver”:“pdo_sqlite”,“wrapperClass”:“OC\\DB\\Connection”,“user”:"",“password”:"",“path”:"\/var\/www\/nextcloud\/data\/owncloud.db",“tablePrefix”:“oc_”,“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:“oc_”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}},{“class”:“Doctrine\\DBAL\\Configuration”},{“class”:“Doctrine\\Common\\EventManager”}]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/Server.php",“line”:640,“function”:“getConnection”,“class”:“OC\\DB\\ConnectionFactory”,“type”:"->",“args”:[“sqlite”,{“user”:"",“password”:"",“path”:"\/var\/www\/nextcloud\/data\/owncloud.db",“tablePrefix”:“oc_”,“sqlite.journal_mode”:“WAL”,“defaultTableOptions”:{“collate”:“utf8_bin”,“tablePrefix”:“oc_”},“platform”:{“class”:“OC\\DB\\OCSqlitePlatform”}}]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:117,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OCP\\IDBConnection”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php",“line”:132,“function”:“query”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[“OCP\\IDBConnection”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:165,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OCP\\IDBConnection”]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php",“line”:114,“function”:“OC\\AppFramework\\Utility\\{closure}”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:117,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“DatabaseConnection”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php",“line”:132,“function”:“query”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[“DatabaseConnection”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/Server.php",“line”:1551,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“DatabaseConnection”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/Server.php",“line”:455,“function”:“getDatabaseConnection”,“class”:“OC\\Server”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:117,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OC\\AppConfig”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php",“line”:132,“function”:“query”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[“OC\\AppConfig”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/Server.php",“line”:694,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OC\\AppConfig”]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php",“line”:118,“function”:“OC\\{closure}”,“class”:“OC\\Server”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:117,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“OC\\App\\AppManager”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php",“line”:132,“function”:“query”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[“OC\\App\\AppManager”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:165,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“OC\\App\\AppManager”]},{“file”:"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php",“line”:114,“function”:“OC\\AppFramework\\Utility\\{closure}”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php",“line”:117,“function”:“offsetGet”,“class”:“Pimple\\Container”,“type”:"->",“args”:[“AppManager”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php",“line”:132,“function”:“query”,“class”:“OC\\AppFramework\\Utility\\SimpleContainer”,“type”:"->",“args”:[“AppManager”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/Server.php",“line”:1722,“function”:“query”,“class”:“OC\\ServerContainer”,“type”:"->",“args”:[“AppManager”]},{“file”:"\/var\/www\/nextcloud\/lib\/private\/legacy\/template.php",“line”:312,“function”:“getAppManager”,“class”:“OC\\Server”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/nextcloud\/index.php",“line”:51,“function”:“printErrorPage”,“class”:“OC_Template”,“type”:"::",“args”:[“Can’t write into config directory!”,“This can usually be fixed by giving the webserver write access to the config directory. See https:\/\/docs.nextcloud.com\/server\/14\/go.php?to=admin-dir_permissions”,503]}],“File”:"\/var\/www\/nextcloud\/lib\/private\/DB\/Connection.php",“Line”:64,“CustomMessage”:"–"},“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.899493 2019] [php7:warn] [pid 15023] [client 192.168.1.15:49420] PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 140
[Thu Jan 17 16:58:25.899529 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“fileperms(): stat failed for \/var\/www\/nextcloud\/data\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#140”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}
[Thu Jan 17 16:58:25.899561 2019] [php7:notice] [pid 15023] [client 192.168.1.15:49420] {“reqId”:“XECJ-sQl5jUNwyPrhDhsaQAAAAA”,“level”:3,“time”:“2019-01-17T13:58:25+00:00”,“remoteAddr”:“192.168.1.15”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/",“message”:“chmod(): No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#141”,“userAgent”:“Mozilla\/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36”,“version”:""}

Вот моя установка по шагам:
Step 1: Creating MySQL Database

sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

sudo yum install mysql-community-server

Starting MySQL

sudo systemctl enable mysqld

sudo systemctl start mysqld

sudo systemctl status mysqld

sudo grep ‘temporary password’ /var/log/mysqld.log

sudo mysql_secure_installation

Enter

Marin2020()

No

Yes

Yes

Yes

Yes

mysql -u root -p

CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

CREATE USER ‘nextclouduser’@‘localhost’ IDENTIFIED BY ‘As1234567890-=Qwerty’;

GRANT ALL PRIVILEGES ON nextcloud.* TO ‘nextclouduser’@‘localhost’;

FLUSH PRIVILEGES;

EXIT;

Step 2: Installing PHP and Apache

yum repolist all

yum --enablerepo="base" -y install yum-utils

yum-config-manager --enable base centosplus contrib extras updates

sudo yum install epel-release

sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

sudo yum-config-manager --enable remi-php72

sudo yum install httpd php php-gd php-json php-mysql php-curl php-mbstring php-intl php-mcrypt php-imagick php-xml php-zip

Step 3: Configuring firewall

sudo firewall-cmd --permanent --zone=public --add-service=http

sudo firewall-cmd --permanent --zone=public --add-service=https

sudo firewall-cmd --reload

sudo firewall-cmd --state

firewall-cmd --get-default-zone

firewall-cmd --get-active-zones

sudo firewall-cmd --list-all

Step 4: Downloading Nextcloud

yum install wget

yum install unzip

wget -P /tmp https://download.nextcloud.com/server/releases/nextcloud-15.0.0.zip

sudo unzip /tmp/nextcloud-15.0.0.zip -d /var/www

sudo chown -R apache: /var/www/nextcloud

Ls /var/www/

Ls /var/www/nextcloud

Step 5: Configure Apache

Yum install nano

sudo nano /etc/httpd/conf.d/nextcloud.conf

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All

<IfModule mod_dav.c>
Dav off
</IfModule>

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud

</Directory>

sudo systemctl restart httpd

sudo systemctl status httpd

yum install policycoreutils-python

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/data(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/config(/.*)?’

emanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/apps(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.htaccess’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.user.ini’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?’

restorecon -R ‘/var/www/html/nextcloud/’

setsebool -P httpd_can_network_connect on

From the error log it looks like the webserver user doesn’t have required permissions to write to the Nextcloud directory.

Not sure about the related username on centos, but on Debian the solution would be:
sudo chown -R www-data:www-data /var/www/html/nextcloud

EDIT: Ah in your install steps it looks like the Nextcloud directory location was mixed up. Some commands expect it at /var/www/nextcloud, some at /var/www/html/nextcloud.
Please check the correct location and repeat the faulty command with it.

1 Like

When i run
sudo chown -R www-data:www-data /var/www/html/nextcloud
writes an error:
chown invalid user: ‘www-data:www-data’
but perhaps this is not what I give out?
sudo chown -R apache: /var/www/nextcloud

Thank you very much!
I fixed in my installation:
with
semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/data(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/config(/.*)?’

emanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/apps(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.htaccess’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.user.ini’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?’

restorecon -R ‘/var/www/html/nextcloud/’

on
semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/data(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/config(/.*)?’

emanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/apps(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/.htaccess’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/.user.ini’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?’

restorecon -R ‘/var/www/nextcloud/’

it all worked!

Ah jep, just checked your logs and setup steps again:

  • Your webserver user is: apache
  • Your Nextcloud dir is: /var/www/nextcloud

So setting permissions then is: sudo chown -R apache:apache /var/www/nextcloud

So your assumed corrected commands match, great that it works now.

I tried everything but still can’t figure it out what’s wrong

`

> {"reqId":"YKNqP4zMtlSmKjulgClhegAAAMM","level":3,"time":"2021-05-18T07:18:23+00:00","remoteAddr":"192.168.25.140","user":"--","app":"base","method":"GET","url":"/","message":{"Exception":"ErrorException","Message":"session_name(): Cannot change session name when headers already sent","Code":0,"Trace":[{"function":"trapError","class":"OC\\Session\\Internal","type":"->"},{"function":"session_name"},{"file":"/var/www/html/nextcloud/lib/private/Session/Internal.php","line":209,"function":"call_user_func_array"},{"file":"/var/www/html/nextcloud/lib/private/Session/Internal.php","line":55,"function":"invoke","class":"OC\\Session\\Internal","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":417,"function":"__construct","class":"OC\\Session\\Internal","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":639,"function":"initSession","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1076,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":35,"args":["/var/www/html/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Session/Internal.php","Line":185,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0",“version”:“21.0.1.1”}

edit: it was working earlier then i changed my ip and also the config file but then it started showing the error
after that i restored everything as earlier but it still isn’t working
`

@DEFINATE-RGB Hi and welcome to the user-forum of NC.

I think you shouldn’t re-open a thread that’s +2 years old since it most probably would be outdated.
So best way to go would be: Opening a new thread (and refer - by link - to this one if you like).
Plus we do need a ton of informations about your server… Let yourself inspire by the template that you’re gonna find when you open a new thread under support-category.

so sorry for that i’ll open a new thread

1 Like