Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

502 Gateway Error while installation in Nginx

rahul36rahul36 New
edited February 2015 in Vanilla 2.0 - 2.8

Ending up with a 502 gateway error while installing in Nginx webserver. All other php based installations seem to work fine, like Wordpress PHPBB and all. :anguished:

Here, this is the error log associated with this incident

2015/02/01 04:03:09 [error] 1983#0: *2454341 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: HTTP_CACHE_CONTROL in /home/worldanimeclub.com/www/wp-index-redis.php on line 41" while reading response header from upstream, client: 108.162.221.198, server: worldanimeclub.com, request: "GET /activity/feed/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "worldanimeclub.com"

But the thing is that I am trying to install Vanilla in another domain (folder), but the error log is displaying matters related to the domain in which Wordpress is installed (with Redis as cache).

Also, this is my Nginx server block for the vanilla:

server {
listen 80;
server_name www.worldanime.club;

access_log /home/community/wacommunity/logs/access.log;
error_log /home/community/wacommunity/logs/error.log;

location / {
        root /home/community/wacommunity/;
        index index.php;

        if (-f $request_filename) {
          break;
        }

        if (-d $request_filename) {
          break;
         }

        rewrite ^(.+)$ /index.php$1 last;
        error_page  404  = /index.php;
}

location ~ \.php$ {
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_index   index.php;
    fastcgi_param   SCRIPT_FILENAME /home/community/wacommunity/public$fastcgi_script_name;
    include         /etc/nginx/fastcgi_params;
}

#
# path_info fix
#

location ~ \.php($|/) {

    set $script     $uri;
    set $path_info  "";

    if ($uri ~ "^(.+\.php)(/.+)") {
        set $script     $1;
        set $path_info  $2;
    }

    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME    /home/community/wacommunity/public$script;
    fastcgi_param  SCRIPT_NAME        $script;
    fastcgi_param  PATH_INFO          $path_info;

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;

    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx;

    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    fastcgi_param  REDIRECT_STATUS    200;

}

}

Sign In or Register to comment.