Я привык устанавливать сервер owncloud на Fedora, но на этот раз я установил nextcloud на CentOS 7. Я выполнил процедуру.
# yum install nextcloud
# yum install crypto-utils mod_ssl openssl
# genkey hostname
edit
/etc/httpd/conf.d/ssl.conf
adding
SSLCertificateFile /etc/pki/tls/certs/hostname.crt
SSLCertificateKeyFile /etc/pki/tls/private/hostname.key
let's prepare the database
# yum install mariadb-server
# systemctl enable --now mariadb
$ mysql_secure_installation
$ mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit
then
# sudo -u apache php occ maintenance:install --data-dir /var/lib/nextcloud/data/ --database "mysql" --database-name "nextcloud" --database-user "nextcloud" --database-pass "password" --admin-user "admin" --admin-pass "password"
then edit
/etc/owncloud/config.php
and add machine ip address under 'trusted_domains'
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload
К сожалению, на этот раз nextcloud не работает, действительно, пытаясь открыть
https://machine_ip/nextcloud
я получил
Forbidden. You don't have permission to access /nextcloud on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
несколько строк # cat / var / log / httpd / ssl_error_log
[Tue Mar 07 00:51:39.331935 2017] [authz_core:error] [pid 2456] [client removed_by_me:51184] AH01630: client denied by server configuration: /usr/share/nextcloud
[Tue Mar 07 00:51:39.331988 2017] [authz_core:error] [pid 2456] [client removed_by_me:51184] AH01630: client denied by server configuration: /usr/share/nextcloud/core/templates/403.php
[Tue Mar 07 00:59:19.968622 2017] [ssl:warn] [pid 2498] AH01909: RSA certificate configured for fe80::removed_by_me:443 does NOT include an ID which matches the server name
[Tue Mar 07 00:59:20.006434 2017] [ssl:warn] [pid 2498] AH01909: RSA certificate configured for fe80::removed_by_me:443 does NOT include an ID which matches the server name
[Tue Mar 07 00:59:30.267154 2017] [authz_core:error] [pid 2503] [client removed_by_me:51450] AH01630: client denied by server configuration: /usr/share/nextcloud
[Tue Mar 07 00:59:30.267226 2017] [authz_core:error] [pid 2503] [client removed_by_me:51450] AH01630: client denied by server configuration: /usr/share/nextcloud/core/templates/403.php
[Tue Mar 07 01:00:20.574679 2017] [authz_core:error] [pid 2505] [client removed_by_me:51488] AH01630: client denied by server configuration: /usr/share/nextcloud
[Tue Mar 07 01:00:20.574931 2017] [authz_core:error] [pid 2505] [client removed_by_me:51488] AH01630: client denied by server configuration: /usr/share/nextcloud/core/templates/403.php
[Tue Mar 07 01:00:49.528960 2017] [ssl:emerg] [pid 2537] AH02204: Init: Pass phrase incorrect for key of fe80::removed_by_me:443
[Tue Mar 07 01:00:49.529005 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Tue Mar 07 01:00:49.529021 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
[Tue Mar 07 01:00:49.529032 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Tue Mar 07 01:00:49.529044 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA)
[Tue Mar 07 01:00:49.529066 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
[Tue Mar 07 01:00:49.529077 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Tue Mar 07 01:00:49.529087 2017] [ssl:emerg] [pid 2537] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
[Tue Mar 07 01:01:12.593572 2017] [ssl:warn] [pid 2568] AH01909: RSA certificate configured for fe80::removed_by_me:443 does NOT include an ID which matches the server name
[Tue Mar 07 01:01:12.669001 2017] [ssl:warn] [pid 2568] AH01909: RSA certificate configured for fe80::removed_by_me:443 does NOT include an ID which matches the server name
[Tue Mar 07 01:19:01.904878 2017] [authz_core:error] [pid 2573] [client removed_by_me:55170] AH01630: client denied by server configuration: /usr/share/nextcloud
[Tue Mar 07 01:19:01.905130 2017] [authz_core:error] [pid 2573] [client removed_by_me:55170] AH01630: client denied by server configuration: /usr/share/nextcloud/core/templates/403.php
You don't have permission to access /nextcloud on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
# cat /etc/httpd/conf.d/nextcloud.conf
# cat /etc/httpd/conf/httpd.conf
# cat /etc/httpd/conf.d/ssl.conf
# ls -latr /etc/httpd/conf.d/
total 64
-rw-r--r--. 1 root root 691 6 nov 01.32 php.conf
-rw-r--r--. 1 root root 1252 14 nov 17.53 userdir.conf
-rw-r--r--. 1 root root 2926 14 nov 19.04 autoindex.conf
-rw-r--r--. 1 root root 366 14 nov 19.05 README
-rw-r--r--. 1 root root 2407 1 mar 02.39 nextcloud-defaults.inc
-rw-r--r--. 1 root root 1893 1 mar 02.39 nextcloud.conf
-rw-r--r--. 1 root root 263 1 mar 02.39 nextcloud-auth-none.inc
-rw-r--r--. 1 root root 313 1 mar 02.39 nextcloud-auth-local.inc
-rw-r--r--. 1 root root 278 1 mar 02.39 nextcloud-auth-any.inc
-rw-r--r--. 1 root root 994 1 mar 02.39 nextcloud-access.conf.avail
drwxr-xr-x. 5 root root 4096 6 mar 13.59 ..
drwxr-xr-x. 2 root root 4096 6 mar 17.30 .
-rw-r--r--. 1 root root 9432 6 mar 17.33 ssl.conf
-rw-r--r--. 1 root root 837 7 mar 00.25 welcome.conf
# ls -latr /etc/httpd/conf.modules.d/
total 44
-rw-r--r--. 1 root root 216 6 nov 01.32 10-php.conf
-rw-r--r--. 1 root root 451 14 nov 17.53 01-cgi.conf
-rw-r--r--. 1 root root 88 14 nov 17.53 00-systemd.conf
-rw-r--r--. 1 root root 41 14 nov 17.53 00-ssl.conf
-rw-r--r--. 1 root root 957 14 nov 17.53 00-proxy.conf
-rw-r--r--. 1 root root 742 14 nov 17.53 00-mpm.conf
-rw-r--r--. 1 root root 41 14 nov 17.53 00-lua.conf
-rw-r--r--. 1 root root 139 14 nov 17.53 00-dav.conf
-rw-r--r--. 1 root root 3739 14 nov 17.53 00-base.conf
drwxr-xr-x. 5 root root 4096 6 mar 13.59 ..
drwxr-xr-x. 2 root root 4096 6 mar 17.30 .
Если вам нужен другой журнал, сообщите мне
Решено с помощью
# ln -s /etc/httpd/conf.d/nextcloud-access.conf.avail /etc/httpd/conf.d/z-nextcloud-access.conf
Источник: строки [7,12] из /etc/httpd/conf.d/nextcloud.conf