Im having some difficulty with tank auth (in Codeigniter).
We have it set up on top of NGINX and for the most part it seems to work fine. Ive just 'installed' the Tank_Auth library and its not working.
On the register page I am deliberately entering erroneous information and the page seems to just refresh and go back to the empty form.
Having a look at the network tab in Chrome dev tools it looks like its trying to post to the correct controller but its throwing a 404. This leads me to believe there is a problem with the NGINX conf doing some strange re-write/location based work.
I have no experience in these conf files so im at somewhat of a loss.
Below is the output from the request, then below that my 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;
}
}
}