1

My wordpress MU setup, with Nginx, is showing a blank page with following errors and access log entries.

"GET / HTTP/1.1" **302** 293 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19"
"GET /favicon.ico HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19"

And on the main page, after turning on Debug in wordpress I get following warning (not sure if they are creating the problem)

Notice: Undefined index: HTTPS in /home/optimizebuzz/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 526
Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /home/optimizebuzz/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 526

Here are my configurations for nginx:

nginx.conf:

user www-data www-data;
worker_processes  2;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

# Keeps the logs free of messages about not being able to bind().
#daemon     off;

events {
        worker_connections  1024;
}

http {
#       rewrite_log on;
        include mime.types;
        default_type       application/octet-stream;
        access_log         /var/log/nginx/access.log;
        sendfile           on;
#       tcp_nopush         on;
        keepalive_timeout  3;
#       tcp_nodelay        on;
#       gzip               on;
        client_max_body_size 25M;
        index              index.php index.html index.htm;

        # Upstream to abstract backend connection(s) for PHP.
        upstream php {
                server unix:/tmp/php-fpm.sock;
        }

        include sites-enabled/*;
}




**--------------------------------**

server {
listen 8080;
server_name *.optimizebuzz.com;
        root /home/optimizebuzz/public_html;

        location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
        {
                root /home/optimizebuzz/public_html;
                rewrite ^/.*(/wp-.*/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
                rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$
                /wp-content/blogs.php?file=$1 last;
                expires 30d;
                break;
        }
error_page 404 = /index.php?q=$uri;
        include global/wp-supercache.conf;
        include global/restrictions.conf;
        include global/wordpress.conf;
}
mgorven
  • 30,615
  • 7
  • 79
  • 122
Farhan
  • 4,269
  • 11
  • 49
  • 80

2 Answers2

1

The first debug line seems to be pointing to the problem. It appears that a plugin "wp-super-cache" is misbehaving. Since you're not on a default Wordpress install, there isn't much other debugging to do until you get it into a pristine, default state.

Disable that plugin, then clear your browser cache (or use a different browser) and try navigating to your site again. Note that 302 redirects are heavily cached by all browsers, so visiting a site and getting a 302 means you'll redirect for a while, even if the 302 on the live site is gone.

Joel E Salas
  • 5,572
  • 16
  • 25
  • Thanks, but i have removed the wp-supercache plugin, but still getting same 302 redirst. – Farhan Apr 26 '12 at 20:58
  • Did you try a different browser? You may also wish to monitor HTTP traffic: http://stackoverflow.com/questions/1271768/what-http-traffic-monitor-would-you-recommend-for-windows – Joel E Salas Apr 26 '12 at 21:08
  • yes, i have tried chrome and firefox. on both the same issue. let me try with http request sniffing. – Farhan Apr 26 '12 at 21:09
  • still same issue, i get this: Request URL:http://optimizebuzz.com/wp-admin/ Request Method:GET Status Code:302 Moved Temporarily – Farhan Apr 26 '12 at 21:13
0

This looks like an improper handling of headers in wp-super-cache; I notice that this may have been updated in future updates (patch); have you tried updating wp-super-cache?

Andrew M.
  • 11,182
  • 2
  • 35
  • 29