Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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;
}
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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?

share|improve this answer
    
Thanks, but i have removed the wp-supercache plugin, but still getting same 302 redirst. –  Farhan Apr 26 '12 at 20:58
    
Are you still seeing an error? –  Andrew M. Apr 26 '12 at 21:55

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.

share|improve this answer
    
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: stackoverflow.com/questions/1271768/… –  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:optimizebuzz.com/wp-admin Request Method:GET Status Code:302 Moved Temporarily –  Farhan Apr 26 '12 at 21:13

Your Answer

 
discard

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.