777 -R web/public/
user = deploy
中更改了group = deploy
,/etc/opt/remi/php72/php-fpm.d/www.conf
我的问题是: -我可以运行php,但无法通过浏览器访问静态文件(css,js ...)
这是一条错误消息:
-19/04/27 22:51:22 [错误] 4165#0:* 1601 open()“ /home/deploy/web/public/robots.txt”失败(13:权限被拒绝),客户端: 216.244.66.xxx,服务器:_,请求:“ GET /robots.txt HTTP / 1.1”,主机:“ domain.com”
这是Nginx设置
server {
listen 80;
server_name domain.con;
root /home/deploy/web/public;
index index.html index.php;
error_log /var/logs/nginx/error_log error;
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
root /home/deploy/web/public;
autoindex on;
access_log on;
expires max;
log_not_found on;
}
请帮助我
更新,解决方法是:
chmod +x /home/deploy
chmod +x /home/deploy/public
答案 0 :(得分:0)
运行命令:
chmod +x /home/deploy
chmod +x /home/deploy/public