惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
G
Google Developers Blog
M
MIT News - Artificial intelligence
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
B
Blog
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - 范圣帅

mono+jexus 之连接数据库 mono+jexus 验证码不显示:System.Drawing CentOS安装epel system 函数 tcp/ip协议listen函数中backlog参数的含义与php-fpm的502 Bad Gateway tengine-2.1.0 + lua + base64 tengine-2.1.0 + GraphicsMagick-1.3.20 nginx 反向代理 ArchLinux 下架设PPTPD VPN服务 - 范圣帅 MAMP PRO 下安装 memcache MAC 版本 phpstorm 配置 theme [转]MinGW编译wxWidgets问题 Eclipse 破解ZendStudio 10.1 shell 快速移动,快捷操作 GDI 画出半透明 MFC 常用关闭窗口 MFC 中全局变量的使用 Unicode下RegQueryValueEx读取注册表值问题
archlinux 下 nignx + php 出现 no input file specified
范圣帅 · 2014-10-10 · via 博客园 - 范圣帅

奇葩的问题,配置 nginx + php + mysql 后,加一个站点:

server {
        listen       80;
        server_name  wei.abc.com;
        root /www/wei.abc.com/;
        index  index.html index.htm index.php;

#       if (!-f $request_filename) {
#               rewrite ^/(.*)$ /f.php last;
#       }

        location / {
        }

        location ~ \.php$ {
            root           /www/wei.abc.com;
                fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
}

 死活访问都是 no input file specified,打开 /etc/php/php-fpm.conf,找到 access_log 打开,access_format打开,发现文件路径也正确,配出 nginx 配置问题

后发现 /etc/php.ini 中对 php 的路径做了限制:

open_basedir 中巴网站路径加上即可,或者直接注释掉也行(安全起见,还是加一个目录比较好)。