在NGINX和PostgreSQL上的Codeigniter和Tank Auth

时间:2013-06-27 09:04:37

标签: php codeigniter nginx tankauth

我在使用tank auth时遇到了一些困难(在Codeigniter中)。

我们已经将它设置在NGINX之上,并且在大多数情况下它似乎工作正常。 我刚刚“安装”了Tank_Auth库并且无法正常工作。

在注册页面上,我故意输入错误信息,页面似乎只是刷新并返回空白表单。

看一下Chrome开发工具中的网络标签,看起来它试图发布到正确的控制器,但它扔了404.这让我相信NGINX conf有一个问题做了一些奇怪的重写/基于位置的工作。

我没有这些conf文件的经验,所以我有些不知所措。

以下是请求的输出,然后是我的NGINX conf:

Request URL:http://localhost:8080/auth/register
Request Method:POST
Status Code:404 Not Found
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:104
Content-Type:application/x-www-form-urlencoded
Cookie:ci_session=Ive hidden this
Host:localhost:8080
Origin:http://localhost:8080
Referer:http://localhost:8080/auth/register
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Form Dataview sourceview URL encoded
username:sfjskl
email:kldsjfkljkljdsfklj
password:klfjdskljklvdjlk
confirm_password:js
register:Register
Response Headersview source
Connection:close
Content-Type:text/html
Date:Thu, 27 Jun 2013 08:48:35 GMT
Server:nginx/1.4.1
Transfer-Encoding:chunked
X-Powered-By:PHP/5.4.15

worker_processes  1;

error_log  logs/error.log;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    server {
        listen       8080;
        server_name  myservername;

    # catch all
    error_page 404 /index.php;

        location / {
            root   html;
            index  index.php index.html index.htm;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {  
                root html;
         include fastcgi_params;  
                keepalive_timeout 0;  
                fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;  
                fastcgi_pass    myservername:9000;
            }   
    }
}

0 个答案:

没有答案