[英]Permission denied on Centos7, Apache, Mod Passenger and Ruby 2.6.3
我從未嘗試過使用 Cent-OS 來托管我的 Rails 應用程序。 我以前使用過,現在我得到了一台運行 Cent-OS 7 的服務器。我安裝了 Apache、Phusion Passenger、RVM、Ruby 2.6.3 並捆綁更新了 Rails 應用程序。 一切都很好。
我添加了虛擬主機並重新啟動了 Apache2 服務器,我從瀏覽器收到了 403 Forbidden 消息。
我還檢查了 error_log 我得到了以下錯誤。
[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>
app目錄的權限為:
drwxrwxr-x. 4 santosh santosh 31 May 18 2019 app
我無法弄清楚我錯過了什么。 請幫我。
您是否檢查了服務器上的文件夾權限,請嘗試在您的文件夾上運行“ls -l”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.