熟悉Ngnix配置的高手请进
时间:2011-05-08
来源:互联网
大家好:
最近我遇到一个问题,我的网站地址:
http://127.0.0.1:99/general/document/index.php/send/draft,其它未含index.php这样的网址
用apache服务器可以正确打开,但用Ngnix就无法打开,
前台显示:404 Not Found
后台日志显示:
304 CreateFile() "d:/myoa/webroot/general/document/index.php/send/draft" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /general/document/index.php/send/draft HTTP/1.1", host: "127.0.0.1:99", referrer: "http://127.0.0.1:99/general/"
304 CreateFile() "d:/myoa/webroot/404.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /general/document/index.php/send/draft HTTP/1.1", host: "127.0.0.1:99", referrer: "http://127.0.0.1:99/general/"
我的系统是windows server2003,以下是我的Nignix配置:
HTML code
望高手能指点一个,谢过!
最近我遇到一个问题,我的网站地址:
http://127.0.0.1:99/general/document/index.php/send/draft,其它未含index.php这样的网址
用apache服务器可以正确打开,但用Ngnix就无法打开,
前台显示:404 Not Found
后台日志显示:
304 CreateFile() "d:/myoa/webroot/general/document/index.php/send/draft" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /general/document/index.php/send/draft HTTP/1.1", host: "127.0.0.1:99", referrer: "http://127.0.0.1:99/general/"
304 CreateFile() "d:/myoa/webroot/404.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /general/document/index.php/send/draft HTTP/1.1", host: "127.0.0.1:99", referrer: "http://127.0.0.1:99/general/"
我的系统是windows server2003,以下是我的Nignix配置:
HTML code
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 60;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
server {
listen 99;
server_name localhost;
charset gbk;
location / {
root d:/myoa/webroot;
index index.php index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~* \.(php|php5)$ {
root d:/myoa/webroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME d:/myoa/webroot$fastcgi_script_name;
include fastcgi_params;
}
望高手能指点一个,谢过!
作者: baronyang 发布时间: 2011-05-08
http://127.0.0.1:99/general/document/index.php/send/draft
这个请求应该由apache来处理吧,你的配置规则并没有将这样的请求交给apache来处理。你的配置规则只是将.php结尾的请求交由apache处理。
试试这个吧
location ~* (\.(php|php5)$|/index.php/) { }
这个请求应该由apache来处理吧,你的配置规则并没有将这样的请求交给apache来处理。你的配置规则只是将.php结尾的请求交由apache处理。
试试这个吧
location ~* (\.(php|php5)$|/index.php/) { }
作者: icy_csdn 发布时间: 2011-05-10
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28