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

推荐订阅源

博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
Vercel News
Vercel News
Recent Announcements
Recent Announcements
B
Blog RSS Feed
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
D
Docker
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
L
LangChain Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

博客园 - 范圣帅

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