# Nginx 1.7.0 failed make with Phusion Passenger?

**URL:** <https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679>\
**Category:** NGINX\
**Created:** [April 25, 2014, 7:03am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679 "2014-04-25T07:03:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 25, 2014, 7:03am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679/1 "2014-04-25T07:03:49Z")

</div>

Anyone experience this problem ? I have Nginx 1.5.13 working fine with  
Phusion Passenger 4.0.37 source compile. But trying to update Nginx from  
1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger  
4.0.37  
and 4.0.41 and it fails.

Working Nginx 1.5.13 configuration

nginx -V  
nginx version: nginx/1.5.13  
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)  
TLS SNI support enabled  
configure arguments: --sbin-path=/usr/local/sbin  
–conf-path=/usr/local/nginx/conf/nginx.conf --with-http\_ssl\_module  
–with-http\_gzip\_static\_module --with-http\_stub\_status\_module  
–with-http\_sub\_module --with-http\_addition\_module  
–with-http\_image\_filter\_module --with-http\_secure\_link\_module  
–with-http\_flv\_module --with-http\_realip\_module  
–with-openssl-opt=enable-tlsext  
–add-module=…/ngx-fancyindex-ngx-fancyindex  
–add-module=…/ngx\_cache\_purge-2.1  
–add-module=…/headers-more-nginx-module-0.25  
–add-module=…/nginx-accesskey-2.0.3  
–add-module=…/nginx-http-concat-master --with-http\_dav\_module  
–add-module=…/nginx-dav-ext-module-0.0.3  
–add-module=/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/ext/nginx  
–with-openssl=…/openssl-1.0.1g --with-libatomic  
–with-pcre=…/pcre-8.35  
–with-pcre-jit --with-http\_spdy\_module  
–add-module=…/ngx\_pagespeed-release-1.7.30.4-beta

Now when updating to Nginx 1.7.0 fails at this point with both Phusion  
Passenger 4.0.37 and 4.0.41

passenger -v  
Phusion Passenger version 4.0.41

error message

```
            -o objs/addon/nginx/StaticContentHandler.o \

```

/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx/StaticContentHandler.c  
/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx/StaticContentHandler.c:  
In function ‘passenger\_static\_content\_handler’:  
/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx/StaticContentHandler.c:72:  
error: ‘ngx\_http\_request\_t’ has no member named ‘zero\_in\_uri’  
make[1]: \*\*\* [objs/addon/nginx/StaticContentHandler.o] Error 1  
make[1]: Leaving directory `/svr-setup/nginx-1.7.0’  
make: \*\*\* [build] Error 2

* * *

Posted at Nginx Forum:

> **[Nginx 1.7.0 failed make with Phusion Passenger ?](https://forum.nginx.org/read.php?2,249586,249586#msg-249586)**
>
> Anyone experience this problem ? I have Nginx 1.5.13 working fine with Phusion Passenger 4.0.37 source compile. But trying to update Nginx from 1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger 4.0.37 and 4.0.41 and it fails....

---

<div class="post-metadata">

**Author:** ![George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71e660/32.png) [@George](https://www.ruby-forum.com/u/George)\
**Post date:** [April 25, 2014, 7:18am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679/2 "2014-04-25T07:18:33Z")

</div>

grep -C10 zero\_in\_uri  
/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx/StaticContentHandler.c  
if (!(r-\>method & (NGX\_HTTP\_GET|NGX\_HTTP\_HEAD|NGX\_HTTP\_POST))) {  
return NGX\_HTTP\_NOT\_ALLOWED;  
}

```
if (r->uri.data[r->uri.len - 1] == '/') {
    return NGX_DECLINED;
}

#if (PASSENGER_NGINX_MINOR_VERSION == 8 && 

```

PASSENGER\_NGINX\_MICRO\_VERSION  
\< 38) ||   
(PASSENGER\_NGINX\_MINOR\_VERSION == 7 &&  
PASSENGER\_NGINX\_MICRO\_VERSION  
\< 66)  
if (r-\>zero\_in\_uri) {  
return NGX\_DECLINED;  
}  
#endif

```
log = r->connection->log;

ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
               "http filename: \"%s\"", filename->data);

clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);

```

Posted at Nginx Forum:

> **[Re: Nginx 1.7.0 failed make with Phusion Passenger ?](https://forum.nginx.org/read.php?2,249586,249587#msg-249587)**
>
> Anyone experience this problem ? I have Nginx 1.5.13 working fine with Phusion Passenger 4.0.37 source compile. But trying to update Nginx from 1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger 4.0.37 and 4.0.41 and it fails....

---

<div class="post-metadata">

**Author:** ![George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71e660/32.png) [@George](https://www.ruby-forum.com/u/George)\
**Post date:** [April 25, 2014, 7:35am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679/3 "2014-04-25T07:35:04Z")

</div>

removing these lines in  
/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx/StaticContentHandler.c  
seem to have allowed it to compile properly

if (r-\>zero\_in\_uri) {  
return NGX\_DECLINED;  
}

nginx -V  
nginx version: nginx/1.7.0  
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)  
TLS SNI support enabled  
configure arguments: --sbin-path=/usr/local/sbin  
–conf-path=/usr/local/nginx/conf/nginx.conf --with-http\_ssl\_module  
–with-http\_gzip\_static\_module --with-http\_stub\_status\_module  
–with-http\_sub\_module --with-http\_addition\_module  
–with-http\_image\_filter\_module --with-http\_secure\_link\_module  
–with-http\_flv\_module --with-http\_realip\_module  
–with-openssl-opt=enable-tlsext  
–add-module=…/ngx-fancyindex-ngx-fancyindex  
–add-module=…/ngx\_cache\_purge-2.1  
–add-module=…/headers-more-nginx-module-0.25  
–add-module=…/nginx-accesskey-2.0.3  
–add-module=…/nginx-http-concat-master --with-http\_dav\_module  
–add-module=…/nginx-dav-ext-module-0.0.3  
–add-module=/usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/ext/nginx  
–with-openssl=…/openssl-1.0.1g --with-libatomic  
–with-pcre=…/pcre-8.34  
–with-pcre-jit --with-http\_spdy\_module  
–add-module=…/ngx\_pagespeed-release-1.7.30.4-beta

Posted at Nginx Forum:

> **[Re: Nginx 1.7.0 failed make with Phusion Passenger ?](https://forum.nginx.org/read.php?2,249586,249588#msg-249588)**
>
> Anyone experience this problem ? I have Nginx 1.5.13 working fine with Phusion Passenger 4.0.37 source compile. But trying to update Nginx from 1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger 4.0.37 and 4.0.41 and it fails....

---

<div class="post-metadata">

**Author:** ![George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71e660/32.png) [@George](https://www.ruby-forum.com/u/George)\
**Post date:** [April 25, 2014, 9:59am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679/4 "2014-04-25T09:59:37Z")

</div>

I’m one of the Phusion Passenger authors. For Phusion Passenger support,  
please use the Phusion Passenger discussion forum, not the Nginx forum.  
It’s  
here: [Redirecting to Google Groups](https://groups.google.com/forum/#!forum/phusion-passenger)

This is a compilation problem due to some old code which tries to  
support  
Nginx 0.7. I’ve just fixed this, and the fix will be available in the  
next  
version, 4.0.42.

> <https://github.com/phusion/passenger/commit/5c1a24d06a0ea5c3f6982b4ebe6322c4eb818601>

Posted at Nginx Forum:

> **[Re: Nginx 1.7.0 failed make with Phusion Passenger ?](https://forum.nginx.org/read.php?2,249586,249591#msg-249591)**
>
> Anyone experience this problem ? I have Nginx 1.5.13 working fine with Phusion Passenger 4.0.37 source compile. But trying to update Nginx from 1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger 4.0.37 and 4.0.41 and it fails....

---

<div class="post-metadata">

**Author:** ![George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71e660/32.png) [@George](https://www.ruby-forum.com/u/George)\
**Post date:** [April 25, 2014, 10:32am UTC](https://www.ruby-forum.com/t/nginx-1-7-0-failed-make-with-phusion-passenger/240679/5 "2014-04-25T10:32:41Z")

</div>

thanks for the reply and fix 🙂

Posted at Nginx Forum:

> **[Re: Nginx 1.7.0 failed make with Phusion Passenger ?](https://forum.nginx.org/read.php?2,249586,249595#msg-249595)**
>
> Anyone experience this problem ? I have Nginx 1.5.13 working fine with Phusion Passenger 4.0.37 source compile. But trying to update Nginx from 1.5.13 to 1.7.0 fails at make stage. I tried both Phusion Passenger 4.0.37 and 4.0.41 and it fails....
