# Compiled nginx doesn't work with PHP

**URL:** <https://www.ruby-forum.com/t/compiled-nginx-doesnt-work-with-php/237741>\
**Category:** NGINX\
**Created:** [November 27, 2013, 8:33am UTC](https://www.ruby-forum.com/t/compiled-nginx-doesnt-work-with-php/237741 "2013-11-27T08:33:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [November 27, 2013, 8:33am UTC](https://www.ruby-forum.com/t/compiled-nginx-doesnt-work-with-php/237741/1 "2013-11-27T08:33:03Z")

</div>

Hello there, I have posted this question on stackoverflow already but  
thought this place would be more appropriate.

I have a properly installed (apt-get) nginx that works perfectly with  
html  
and php (php5-fpm) but when I download the source of the same version (I  
don’t modify it for testing purposes), I configure it with “sudo  
./configure  
–prefix=/etc/nginx --sbin-path=/usr/sbin --without-http\_gzip\_module”  
then  
make, install, reload and restart it. All the PHP files stop working  
after  
that, they are being served as binary so the browser prompts to save  
them,  
HTML files continue to be served properly.

Any insights on where to start debugging this issue? All the configs  
remained the same from the working version, the only difference is that  
.php  
files don’t work.

Posted at Nginx Forum:

> **[Compiled nginx doesn't work with PHP](https://forum.nginx.org/read.php?2,244997,244997#msg-244997)**
>
> Hello there, I have posted this question on stackoverflow already but thought this place would be more appropriate. I have a properly installed (apt-get) nginx that works perfectly with html and php (php5-fpm) but when I download the source of the...

---

<div class="post-metadata">

**Author:** ![joshua1991](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@joshua1991](https://www.ruby-forum.com/u/joshua1991)\
**Post date:** [November 27, 2013, 10:49am UTC](https://www.ruby-forum.com/t/compiled-nginx-doesnt-work-with-php/237741/2 "2013-11-27T10:49:13Z")

</div>

Hello!

On Wed, Nov 27, 2013 at 02:32:15AM -0500, joshua1991 wrote:

> Any insights on where to start debugging this issue? All the configs  
> remained the same from the working version, the only difference is that .php  
> files don’t work.

Compare “nginx -V” output for both versions, most likely they use  
diferent prefixes and/or conf paths.

–  
Maxim D.  
[http://nginx.org/en/donation.html](http://nginx.org/en/donation.html)

---

<div class="post-metadata">

**Author:** ![joshua1991](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@joshua1991](https://www.ruby-forum.com/u/joshua1991)\
**Post date:** [November 27, 2013, 6:57pm UTC](https://www.ruby-forum.com/t/compiled-nginx-doesnt-work-with-php/237741/3 "2013-11-27T18:57:08Z")

</div>

Ah the capital -V thanks!

Posted at Nginx Forum:

> **[Re: Compiled nginx doesn't work with PHP](https://forum.nginx.org/read.php?2,244997,245010#msg-245010)**
>
> Hello there, I have posted this question on stackoverflow already but thought this place would be more appropriate. I have a properly installed (apt-get) nginx that works perfectly with html and php (php5-fpm) but when I download the source of the...
