file not found. nginx php nginx 如何开启解析 PHP 的功能
来源:互联网 发布:cmd打开端口命令 编辑:程序博客网 时间:2024/06/09 21:13
file not found. nginx php
这个问题是你配置文件的问题:
查看就是了不要管
nginx 如何开启解析 PHP 的功能?
# 成功安装后,创建 php-fpm.conf 配置文件,删除 nginx.conf 中“pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000”部分的注释
cd /usr/local/php/etc
mv php-fpm.conf.default php-fpm.conf
vi /usr/local/nginx/conf/nginx.conf
# 删除如下部分的注释,保存退出,
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
解决办法:
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
这一句有问题,请再仔细查想一下为什么?
0
- 华晨@kut : 发现了更好的办法,/scripts 改成 $document_root 就好了,呵呵。 (
- 华晨@kut : 哦,我知道了,把 /scripts 改成 /usr/local/nginx/html 就可以了。我刚才在服务器上试了一下,真的可以找到文件并且成功解析了!十分感谢! (4年前)
- kut@华晨: /scripts是一个目录名,也就是你站点的根目录,比如说,你访问/index.php这个文件,其实就是访问操作系统中/scripts/index.php这个文件,这个文件是否存在?(4年前)
# 启动 php-fpm 和 nginx
/usr/local/php/sbin/php-fpm
/usr/local/nginx/sbin/nginx
# 在 nginx 的 html 目录下放一个 php 文件,浏览器访问,不能解析,显示“ File not found.”
0 0
- file not found. nginx php nginx 如何开启解析 PHP 的功能
- nginx php file not found
- nginx解析php时报”File not found“问题解决
- nginx php file not found 错误
- nginx php-fpm file not found错误
- nginx php-fpm file not found错误
- nginx对PHP文件报File not found.错
- nginx+php-fpm出现file not found错误
- 搭建nginx+php环境时遇到”file not found"的问题
- Nginx访问PHP文件的File not found错误处理,两种情况
- Nginx访问PHP文件的File not found错误处理,两种情况
- nginx File not found.
- nginx File not found!
- nginx File not found
- centos nginx php file not find
- nginx File not found 错误
- nginx File not found 错误
- nginx File not found 错误
- android app Lose Weight
- linux sudo 命令学习笔记
- UVA 1648(p346)----Business Center
- IOS Apps 开发(Swift)(6)——Implement a Custom Control(2)
- linux设备驱动归纳总结(八):1.总线、设备和驱动
- file not found. nginx php nginx 如何开启解析 PHP 的功能
- Git分支管理总结
- SQL Server数据库设计规范
- linux设备驱动归纳总结(八):2.总线、设备和驱动的关系
- 通过 ip 直接访问项目
- java日志,需要知道的几件事(commons-logging,log4j,slf4j,logback)
- ubuntu安装依赖包
- 一、Android_UiAutomator(安卓UI自动化)环境搭建
- Netezza 存储过程