新手在线等急,关于nginx安装PHP的问题,请指教 试试运行 php-cgi.exe 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 fastcgi_param SCRIPT_FILENAME C:\www$fastcgi_script_name; ???少了个路径符吧? lnmp jiu hen hao 看一下 php-fpm进程运行了吗? 搜个答案 都是抄的 原创的少。我给你说下nignx 配置php项目 装好后 nginx/conf/nginx.conf 这个 文件 最后 写上 include server/your.conf; 这个your.conf 是 /nginx/conf/server 下 你自建的 php 文件 格式如下 server { listen 80; server_name nginx所在的内网ip; root 项目文件路径; index index.php index.html; client_max_body_size 1000m; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ .\*(gif|jpe|jpge|png|bmp|swf)$ { expires 30d; } location ~ .\*css$ { expires 1h; } location ~ \.php$ { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /home/nginx/conf/fastcgi_params; } location ~ /\.ht { deny all; }}然后用命令 启动 nginx 再去浏览器上看, 如果是linux下 就是一些 端口开放和防火墙没关的问题 把fastcgi_param SCRIPT_FILENAME C:\www$fastcgi_script_name;改成fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;试试 php能调用.net web service不? 求助,能整原来php程序的 留言板源码? 二次开发,找一个精通ECSHOP系统的高手,最好在深圳的 PHP5.4无法开启GD库 如何获取一个网址的真实地址? apache 启动不了 与servername填写错误有关 有谁混用过memcached? 求共享dedecms二次开发视频 PHPmailer 如何添加暗送 PHP 遍历取JSON数据 Yii2.0的url重写问题…… 求类似csdn上传表单的效果
少了个路径符吧?
我给你说下nignx 配置php项目 装好后 nginx/conf/nginx.conf 这个 文件 最后 写上 include server/your.conf; 这个your.conf
是 /nginx/conf/server 下 你自建的 php 文件 格式如下
server {
listen 80;
server_name nginx所在的内网ip;
root 项目文件路径;
index index.php index.html;
client_max_body_size 1000m;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .\*(gif|jpe|jpge|png|bmp|swf)$ {
expires 30d;
}
location ~ .\*css$ {
expires 1h;
}
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /home/nginx/conf/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}然后用命令 启动 nginx 再去浏览器上看, 如果是linux下 就是一些 端口开放和防火墙没关的问题