AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 836682
Accepted
Germano Massullo
Germano Massullo
Asked: 2017-03-07 16:35:31 +0800 CST2017-03-07 16:35:31 +0800 CST 2017-03-07 16:35:31 +0800 CST

nextcloud - 服务器配置拒绝客户端:/usr/share/nextcloud

  • 772

我习惯在 Fedora 上安装 owncloud 服务器,但这次我在 CentOS 7 上安装了 nextcloud。我按照程序

# 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 .

如果您需要任何其他日志,请告诉我

centos redhat nextcloud owncloud
  • 1 1 个回答
  • 4236 Views

1 个回答

  • Voted
  1. Best Answer
    Germano Massullo
    2017-03-08T07:25:18+08:002017-03-08T07:25:18+08:00

    解决了

    # 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

    • 1

相关问题

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 使用 crontab 和 /etc/cron.hourly,daily,weekly 的区别

  • 持续监控许多服务器运行状况的简单方法?

  • Hudson 无法在 tomcat5 中启动

  • CentOS 的依赖挑战

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve