• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Empty POST Array in CodeIgniter + Nginx

#1
[eluser]Ali Fattahi[/eluser]
Hello guys
i have installed nginx 1.0.9 in my server , but i have a problem in codeigniter .
the $POST array is empty when is POST Any data from forms!
i'm using codeigniter 2.0.3 , nginx 1.0.9 and $config['uri_protocol'] = "QUERY_STRING";

That is my nginx's config file
=====================-----------------------------
Code:
server
{

listen 443 default_server ssl;
ssl on;
server_name mysite.com www.mysite.com;

root /home/site/mysite.com/;
ssl_certificate /etc/nginx/config/www_mysite_com.crt;
ssl_certificate_key /etc/nginx/config/www_mysite_com.key;
keepalive_timeout    3;
index index.html index.htm index.php;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;

location / {
  try_files $uri $uri/ /index.php;
  if (-f $request_filename) {
              expires max;
              break;
         }
}
if ($request_uri ~* ^(/welcome(/index)?|/index(.php)?)/?$)
{
  rewrite ^(.*)$ / permanent;
}
if ($request_uri ~* index/?$)
{
  rewrite ^/(.*)/index/?$ /$1 permanent;
}
if (!-d $request_filename)
{
  rewrite ^/(.+)/$ /$1 permanent;
}

# removes access to "system" folder, also allows a "System.php" controller
if ($request_uri ~* ^/system)
{
  rewrite ^/(.*)$ /index.php?/$1 last;
  break;
}

# unless the request is for a valid file (image, js, css, etc.), send to bootstrap
if (!-e $request_filename)
{
  rewrite ^/(.*)$ /index.php?/$1 last;
  break;
}

# catch all
error_page 404 /index.php;
# deny access to apache .htaccess files
location ~ /\.ht
{
  deny all;
}
location ~ \.php$
{
  if ($uri !~ "^/ftp/")
  {
   fastcgi_pass   127.0.0.1:9000;
  }
  fastcgi_index  index.php;
  include fastcgi_params;
  fastcgi_param  PATH_INFO $document_uri;
  fastcgi_param  SCRIPT_FILENAME  /home/site/mysite.com$fastcgi_script_name;
  
}
# Block Download Agents
if ($http_user_agent ~* LWP::Simple|BBBike|wget)
{
            return 403;
      }
if ($http_user_agent ~* msnbot|scrapbot)
{
            return 403;
      }


}


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.