Migrating from Apache to NGINX, google minify stopped working.

zeeshan malik zeeshan.m.malik at gmail.com
Mon Sep 27 15:43:03 MSD 2010


I am using google minify(http://code.google.com/p/minify/) to minify js and
css files. I am migrating from apache to nginx. After migration my js and
urls(e.g: http://mydomain.com/min/?g=group_name) which use minify have
stopped working. Nginx returns 'HTTP/1.0 400 Bad Request' on all the
urls using minfy.

When I visit the address http://mydomain.com/min, it does redirects to
http://mydomain.com/min/builder/ like it used to do with apache, but
instead of showing complete 'Minify URI Builder' page it only shows
Minify URI Builder

Need help? Search or post to the Minify discussion list.

This app is minified :) view source

In firebug I can see that the request
also returns 'HTTP/1.0 400 Bad Request' when i try to access

My server configuration for nginx is as following:
server {
   listen       80;
   server_name  example.com;

   location / {
       root   /path/to/root/dir;
       index  index.php index.html index.htm;

   # redirect server error pages to the static page /50x.html
   error_page   500 502 503 504  /50x.html;
   location = /50x.html {
       root   html;

  location ~ \.php$ {
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /path/to/root/dir/
           include        fastcgi_params;
           fastcgi_param  QUERY_STRING     $query_string;
           fastcgi_param  REQUEST_METHOD   $request_method;
           fastcgi_param  CONTENT_TYPE     $content_type;
           fastcgi_param  CONTENT_LENGTH   $content_length;


Please help me in configuring google minify with nginx.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100927/6afdd9f4/attachment.html>

More information about the nginx mailing list