Fmstrat / odm

ODM: Open Device Manager for Android
GNU General Public License v3.0
112 stars 48 forks source link

Can't register device when odm-web is running on nginx #24

Open berrnd opened 10 years ago

berrnd commented 10 years ago

Nginx doesn't support post requests without a Content-Length header...

lluis commented 9 years ago

which nginx version? on changelog:

Changes with nginx 0.7.25                                        08 Dec 2008
    *) Change: now POSTs without "Content-Length" header line are allowed.
berrnd commented 9 years ago

I had this problem with nginx 1.7.1 on a Ubuntu 12.04 x64 machine...

lluis commented 9 years ago

I am running nginx 1.6.2-4 on Debian 7.7 but don't have that issue, here is my nginx conf:

location /odm {
  root /srv/odm-web;
  index index.php;
  auth_basic           "Restricted Area";
  auth_basic_user_file htpasswd;
  location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
  }
}