# Nginx v0.7.67 and php-fpm 5.3.3 SEO "pretty URL's" Problem

**URL:** <https://www.ruby-forum.com/t/nginx-v0-7-67-and-php-fpm-5-3-3-seo-pretty-urls-problem/192713>\
**Category:** NGINX\
**Created:** [August 4, 2010, 12:51pm UTC](https://www.ruby-forum.com/t/nginx-v0-7-67-and-php-fpm-5-3-3-seo-pretty-urls-problem/192713 "2010-08-04T12:51:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Per\_Hansson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@Per\_Hansson](https://www.ruby-forum.com/u/Per_Hansson)\
**Post date:** [August 4, 2010, 12:51pm UTC](https://www.ruby-forum.com/t/nginx-v0-7-67-and-php-fpm-5-3-3-seo-pretty-urls-problem/192713/1 "2010-08-04T12:51:25Z")

</div>

Hi, I’m having a problem with nginx after upgrading php-fpm from PHP  
version 5.3.2 \> 5.3.3 (internal php-fpm version 0.6.0 \> 0.6.5)  
After doing the upgrade a “pretty URL’s” fastcgi\_pass I use no longer  
works, now php-fpm does not care about the URL’s, so it is very strange  
if that would be the culprit, I’ve asked the php-fpm guys without  
getting anywhere, I’ve also looked for it’s changelog for versions 0.6.0

> 0.6.5 without luck…

This is the rewrite I use:

```auto
        ## Forum Archive fastCGI pass
        location /vb/all/ {
          rewrite ^/vb/all/windows/(.*)$ /vb/all/windows?$1 break;
          rewrite ^/vb/all /vb/all/windows/ permanent;
            fastcgi_pass unix:/dev/shm/php.sock;
            fastcgi_param SCRIPT_FILENAME
$document_root/vb/all/windows;
            fastcgi_param QUERY_STRING $query_string;
        }
```

So you see the file named “windows” without extension is my PHP file,  
with php 5.3.2 this works great, you can see it live here:

> **[TechSpot Forums](https://www.techspot.com/community/)**
>
> Tech Enthusiast and PC Power User Forums

But with php 5.3.3 it fails, I’m linking a log excerpt of the error  
The top part is where it is working  
And below that my internal testserver with the updated PHP where it is  
not working…  
[http://pastebin.com/CqxzUqLf](http://pastebin.com/CqxzUqLf)

Posted at Nginx Forum:

> **[nginx v0.7.67 and php-fpm 5.3.3 SEO "pretty URL's" Problem](https://forum.nginx.org/read.php?2,116453,116453#msg-116453)**
>
> Hi, I'm having a problem with nginx after upgrading php-fpm from PHP version 5.3.2 \> 5.3.3 (internal php-fpm version 0.6.0 \> 0.6.5) After doing the upgrade a "pretty URL's" fastcgi\_pass I use no longer works, now php-fpm does not care...

---

<div class="post-metadata">

**Author:** ![Per\_Hansson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@Per\_Hansson](https://www.ruby-forum.com/u/Per_Hansson)\
**Post date:** [August 4, 2010, 5:03pm UTC](https://www.ruby-forum.com/t/nginx-v0-7-67-and-php-fpm-5-3-3-seo-pretty-urls-problem/192713/2 "2010-08-04T17:03:48Z")

</div>

On Wed, Aug 04, 2010 at 06:50:31AM -0400, Per Hansson wrote:

> ```
> ## Forum Archive fastCGI pass
> 
> ```
> 
> So you see the file named “windows” without extension is my PHP file,  
> with php 5.3.2 this works great, you can see it live here:  
> [http://www.techspot.com/vb/all](http://www.techspot.com/vb/all)
> 
> But with php 5.3.3 it fails, I’m linking a log excerpt of the error  
> The top part is where it is working  
> And below that my internal testserver with the updated PHP where it is  
> not working…  
> [http://pastebin.com/CqxzUqLf](http://pastebin.com/CqxzUqLf)

I have no idea why it can not work on php 5.3.3, but it’s better to  
use this more clear configuration:

```
 location ~ ^/vb/all/windows/(.*)$ {
     fastcgi_pass unix:/dev/shm/php.sock;
     fastcgi_param SCRIPT_FILENAME $document_root/vb/all/windows;
     fastcgi_param QUERY_STRING $1;
 }

 location = /vb/all/ {
     rewrite ^ /vb/all/windows/ permanent;
 }

```

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Per\_Hansson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@Per\_Hansson](https://www.ruby-forum.com/u/Per_Hansson)\
**Post date:** [August 15, 2010, 1:01am UTC](https://www.ruby-forum.com/t/nginx-v0-7-67-and-php-fpm-5-3-3-seo-pretty-urls-problem/192713/3 "2010-08-15T01:01:58Z")

</div>

Hi again, I’ve tried to figure this out best I can but failed so far ☹  
What I find is the last thing in the access log, we have a status code  
of “200” so everything is correct  
However the byte size sent to the client is only 31 bytes, it should be  
1740 bytes…  
When I do “view source” in the client browser I see nothing, and the  
page itself is just a white page

It is as if error logging was not enabled, however there is nothing in  
the logs themselves, and the php.ini has all error reporting features I  
could find enabled;  
fastcgi.logging = 1  
fastcgi.error\_header = “HTTP/1.0 550 Server Made Big Boo”  
error\_reporting = E\_ALL & ~E\_DEPRECATED  
display\_errors = On  
display\_startup\_errors = On  
log\_errors = On  
log\_errors\_max\_len = 1024  
ignore\_repeated\_errors = Off  
ignore\_repeated\_source = Off  
report\_memleaks = On  
track\_errors = Off  
html\_errors = On  
error\_log = /var/log/php.log

nginx.conf;  
Posted above [http://pastebin.com/wptPaLms](http://pastebin.com/wptPaLms)

php-fpm.conf;  
log\_level = debug

php-fpm www.conf  
php\_admin\_flag[log\_errors] = on

Posted at Nginx Forum:

> **[Re: nginx v0.7.67 and php-fpm 5.3.3 SEO "pretty URL's" Problem](https://forum.nginx.org/read.php?2,116453,119883#msg-119883)**
>
> Hi, I'm having a problem with nginx after upgrading php-fpm from PHP version 5.3.2 \> 5.3.3 (internal php-fpm version 0.6.0 \> 0.6.5) After doing the upgrade a "pretty URL's" fastcgi\_pass I use no longer works, now php-fpm does not care...
