我安装了 owncloud 并在其上应用了 SSL,后来我为 https 创建了一个虚拟主机
> <VirtualHost *:80>
> ServerName owncloud
> Redirect permanent / https://xxx.xxx.xxx.xxx/ </VirtualHost>
>
> NameVirtualHost *:443 <VirtualHost *:443>
> SSLEngine on
> SSLCertificateFile /etc/pki/tls/certs/owncloud.crt
> SSLCertificateKeyFile /etc/pki/tls/private/owncloud.key
> <Directory /var/www/html>
> AllowOverride All
> </Directory>
> DocumentRoot /var/www/html/owncloud
> ServerName owncloud
> ErrorLog logs/owncloud-error_log
> CustomLog logs/owncloud-access_log common
>
> <IfModule mod_headers.c>
> Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
> </IfModule>
>
> </VirtualHost>
然后重新启动 HTTPD 并从浏览器访问,一切正常。然后我重新启动操作系统,当它重新上线时我再次尝试访问,但这次我收到了此错误
禁止 您无权访问此服务器上的/owncloud/。
/var/www/html/ drwxr-xr-x 3 root root 22 Nov 8 16:53 /var/www/html/ 的权限
/var/www/html/owncloud drwxr-xr-x 12 apache apache 4096 十一月 15 14:03 /var/www/html/owncloud/ 的权限
Owcloud 目录内
-rw-r--r-- 1 apache apache 1.8K Sep 15 10:42 status.php
-rw-r--r-- 1 apache apache 5.4K Sep 15 10:42 remote.php
-rw-r--r-- 1 apache apache 3.2K Sep 15 10:42 public.php
-rw-r--r-- 1 apache apache 3.9K Sep 15 10:42 index.php
-rw-r--r-- 1 apache apache 179 Sep 15 10:42 index.html
-rw-r--r-- 1 apache apache 31K Sep 15 10:42 db_structure.xml
-rw-r--r-- 1 apache apache 4.9K Sep 15 10:42 cron.php
-rw-r--r-- 1 apache apache 4.3K Sep 15 10:42 console.php
drwxr-xr-x 12 apache apache 225 Sep 15 10:43 settings
drwxr-xr-x 4 apache apache 39 Sep 15 10:43 resources
drwxr-xr-x 2 apache apache 23 Sep 15 10:43 ocs-provider
drwxr-xr-x 2 apache apache 73 Sep 15 10:43 ocs
-rwxr-xr-x 1 apache apache 283 Sep 15 10:43 occ
drwxr-xr-x 6 apache apache 101 Sep 15 10:43 lib
drwxr-xr-x 3 apache apache 32 Sep 15 10:43 l10n
-rw-r--r-- 1 apache apache 34K Sep 15 10:43 COPYING
-rw-r--r-- 1 apache apache 25K Sep 15 10:43 CHANGELOG.md
-rw-r--r-- 1 apache apache 8.7K Sep 15 10:43 AUTHORS
drwxr-xr-x 6 apache apache 130 Sep 15 10:43 updater
drwxrwxrwx 25 apache apache 4.0K Sep 15 10:46 apps
-rw-r--r-- 1 apache apache 271 Sep 15 10:47 version.php
lrwxrwxrwx 1 apache apache 5 Nov 8 17:28 data -> /data
drwxrwxrwx 2 apache apache 49 Nov 12 12:01 config
drwxr-xr-x 17 apache apache 4.0K Nov 13 09:36 core
SELinux 已禁用
我缺少什么?
答案1
有一个脚本可以在 owncloud 安装后恢复正确的权限
此外,您是否检查过 apache2 错误日志以获取更多信息?