Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 在Centos7、Apache、Mod Passenger和Ruby 2.6.3上的权限被拒绝_Css_Ruby On Rails_Ruby_Passenger - Fatal编程技术网

Css 在Centos7、Apache、Mod Passenger和Ruby 2.6.3上的权限被拒绝

Css 在Centos7、Apache、Mod Passenger和Ruby 2.6.3上的权限被拒绝,css,ruby-on-rails,ruby,passenger,Css,Ruby On Rails,Ruby,Passenger,我从未尝试过使用Cent OS来托管我的Rails应用程序。我以前使用过,现在我有了一台运行CentOS7的服务器。我安装了Apache、Phusion Passenger、RVM、Ruby 2.6.3,并捆绑更新了Rails应用程序。在这之前一切都很好 我添加了虚拟主机并重新启动了Apache2服务器,从浏览器收到403条禁止消息 我还检查了错误日志,发现了以下错误 [Tue Feb 11 08:34:14.377938 2020] [core:error] [pid 125490] (13)

我从未尝试过使用Cent OS来托管我的Rails应用程序。我以前使用过,现在我有了一台运行CentOS7的服务器。我安装了Apache、Phusion Passenger、RVM、Ruby 2.6.3,并捆绑更新了Rails应用程序。在这之前一切都很好

我添加了虚拟主机并重新启动了Apache2服务器,从浏览器收到403条禁止消息

我还检查了错误日志,发现了以下错误

[Tue Feb 11 08:34:14.377938 2020] [core:error] [pid 125490] (13)Permission denied: [client 172.69.78.16:30474] AH00035: access to / denied (filesystem path '/home/santosh/sites') because search permissions are missing on a component of the path
[Tue Feb 11 08:34:14.593925 2020] [core:error] [pid 125490] (13)Permission denied: [client 172.69.78.16:30474] AH00035: access to / denied (filesystem path '/home/santosh/sites') because search permissions are missing on a component of the path
虚拟主机:

<VirtualHost *:80>
        ServerName domain.com.np
        ServerAlias www.domain.com.np
        <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{HTTP_HOST} !^www\. [NC]
                RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
        </IfModule>
        # ModPagespeed on
        # Tell Apache and Passenger where your app's 'public' directory is
        DocumentRoot /home/santosh/sites/app/public
        PassengerRuby /home/santosh/.rvm/gems/ruby-2.6.3/wrappers/ruby

        # Relax Apache security settings
        <Directory /home/santosh/sites/app/public>
                Allow from all
                Options -MultiViews
                # Uncomment this if you're on Apache >= 2.4:
                Require all granted
        </Directory>
</VirtualHost>

我不知道我错过了什么。请帮助我。

如果您已检查服务器上的文件夹权限,请尝试在您的文件夹上运行“ls-l”

是,权限为
drwxrwxr-x。4桑托什桑托什
。我更新了我的问题。请检查santosh上的.chmod 755-R,以防子目录具有错误的权限-R是递归的,将把权限应用到所有子目录。
drwxrwxr-x. 4 santosh santosh        31 May 18  2019 app