# Migrating from Apache to NGINX, google minify stopped working

**URL:** <https://www.ruby-forum.com/t/migrating-from-apache-to-nginx-google-minify-stopped-working/195636>\
**Category:** NGINX\
**Created:** [September 27, 2010, 1:44pm UTC](https://www.ruby-forum.com/t/migrating-from-apache-to-nginx-google-minify-stopped-working/195636 "2010-09-27T13:44:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeeshan\_malik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/71e660/32.png) [@zeeshan\_malik](https://www.ruby-forum.com/u/zeeshan_malik)\
**Post date:** [September 27, 2010, 1:44pm UTC](https://www.ruby-forum.com/t/migrating-from-apache-to-nginx-google-minify-stopped-working/195636/1 "2010-09-27T13:44:12Z")

</div>

Hello,

I am using google minify([GitHub - mrclay/minify: Combines. minifies, and serves CSS or Javascript files](http://code.google.com/p/minify/)) to minify js  
and  
css files. I am migrating from apache to nginx. After migration my js  
and  
css  
urls(e.g: [http://mydomain.com/min/?g=group\_name](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](http://mydomain.com/min), it does redirects to [http://mydomain.com/min/builder/](http://mydomain.com/min/builder/) like it used to do with apache, but instead of showing complete ‘Minify URI Builder’ page it only shows following:

* * *

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  
[http://example.com/min/?f=min/builder/\_index.js](http://example.com/min/?f=min/builder/_index.js)  
also returns ‘HTTP/1.0 400 Bad Request’ when i try to access  
[http://mydomain.com/min](http://mydomain.com/min).

## My server configuration for nginx is as following:

server {  
listen 80;  
server\_name [example.com](http://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\_pass 127.0.0.1:9000;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME /path/to/root/dir/  
$fastcgi\_script\_name;  
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.

Thanks,  
ZM.
