Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have WP installed on my VPS (with nginx 1.3.12 and php5-fpm 5.4.11).

The first page of search results (/?s=test) is loaded properly, but /page/2/?s=test displays the same content of /page/2/ (so ?s=test isn't taken into account).

It's probably something wrong with my nginx config:

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;

location / {
# if you're just using wordpress and don't want extra rewrites
# then replace the word @rewrites with  /index.php
try_files $uri $uri/ /index.php;


Articles work fine anyway.. the permalink structure (/%year%/%monthnum%/%day%/%postname%/) works fine.. so I should find a fix that doesn't break that (but "fixes" the search parameter problem).


Page 1 (/?s=test):

Page 2 (/page/2/?s=test):

Thanks in advance.

share|improve this question
up vote 0 down vote accepted

Solved changing the location block with this:

    location / {
            try_files $uri $uri/ /index.php?$args;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.