gpt4 book ai didi

php - aws + centos 7 + 内置 nginx ngx_pagespeed + php-fpm = 找不到文件

转载 作者:行者123 更新时间:2023-12-04 19:44:17 25 4
gpt4 key购买 nike

我已经尝试了一切并验证了一切都在同一个组上运行。

也chown'd文件到nginx:nginx和chmod'd他们到755
这是服务器 block

server {
listen 80;

root /var/www/example.com/public_html;
index index.php index.html index.htm;

server_name example.com;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

# Pagespeed main settings

pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;

# Ensure requests for pagespeed optimized resources go to the pagespeed
# handler and no extraneous headers get set.

location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
location ~ "^/ngx_pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon" { }

location ~ \.php$ {
try_files $uri =404;

fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
}
}

最佳答案

按照这个关于 SELinux 的教程。我是 CentOS 的新手,所以我不熟悉所有的安全参数。

https://www.cloudinsidr.com/content/troubleshooting-php-7-tcp-sockets-with-selinux-on-centos-7-rhelfedora/

关于php - aws + centos 7 + 内置 nginx ngx_pagespeed + php-fpm = 找不到文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38629386/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com