我正在尝试部署我的laravel项目。我已经安装了apache,mysql,php,composer和laravel,并将我的项目拉入/ home / spark并运行composer install。现在当我浏览我的ip时,我只看到了apache测试页面。
当我查看我的日志文件时,我看到了这两个错误:
[Sun Nov 22 17:37:54.598627 2015] [core:error] [pid 16141] (13)Permission denied: [client 78.20.130.157:50142] AH00035: access to /index.html denied (filesystem path '/home/spark/public/index.html') because search permissions are missing on a component of the path
[Sun Nov 22 17:37:54.598708 2015] [core:error] [pid 16141] (13)Permission denied: [client 78.20.130.157:50142] AH00035: access to /index.php denied (filesystem path '/home/spark/public/index.php') because search permissions are missing on a component of the path
我不知道如何修复渗透。有人可以帮帮我吗? 提前谢谢!
这是我的虚拟主机的spark.conf文件可能也不好:
<Directory "/home/spark/public">
Require all granted
</Directory>
<VirtualHost *:80>
ServerName myurl
DocumentRoot "/home/spark/public"
ErrorLog "/var/log/httpd/spark-error"
CustomLog "/var/log/httpd/spark-customlog" Common
</VirtualHost>
/ home / spark / public
中我的文件的权限drwxr-x--- 5 root root 4096 Nov 22 16:33 .
drwxr-x--- 13 spark apache 4096 Nov 22 16:35 ..
drwxr-x--- 2 root root 4096 Nov 22 16:33 css
-rwxr-x--- 1 root root 0 Nov 22 16:33 favicon.ico
-rwxr-x--- 1 root root 412 Nov 22 16:33 .htaccess
drwxr-x--- 2 root root 4096 Nov 22 16:33 images
-rwxr-x--- 1 root root 1786 Nov 22 16:33 index.php
-rwxr-x--- 1 root root 24 Nov 22 16:33 robots.txt
drwxr-x--- 3 root root 4096 Nov 22 16:33 uploads
答案 0 :(得分:1)
让apache成为所有应用程序文件夹和文件的所有者,如下所示:
sudo chown -R apache:apache .
在运行此命令之前,您当前的文件夹应该是应用程序文件夹