LINUX.ORG.RU
ФорумAdmin

Nginx HTTP/1.1 302 Moved Temporarily


0

1

Приветствую.
Настраиваю связку varnish+nginx+php5-fpm.
Когда сайт дёргаю курлом вижу ошибку:
curl -i http://192.168.0.3/index.php HTTP/1.1 302 Moved Temporarily
В дебаге лога nginx:
http upstream recv(): -1 (11: Resource temporarily unavailable)
http fastcgi header: «Status: 302 Moved Temporarily»

При этом в принципе сайт работает.
Вот только варниш ругается (
web1 Still sick 4--X-R- 0 3 5 0.294136 0.000000 HTTP/1.1 302 Moved Temporarily
web2 Still sick 4--X-R- 0 3 5 0.231400 0.000649 HTTP/1.1 302 Moved Temporarily

Подскажите как исправить эту ошибку ? Спасибо за помощь.

Ответ на: комментарий от USF
user  www-data;
worker_processes  24;
timer_resolution 100ms;
worker_rlimit_nofile 499999;
worker_priority -10;

error_log  /var/log/nginx/error.log info;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections 4096;
    use epoll;
    multi_accept on;
}

http {
    proxy_buffers 8 16k;
    proxy_buffer_size 32k;
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    client_max_body_size 500m;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m;
    open_file_cache max=200000 inactive=20s;
    open_file_cache_valid 30s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

    #access_log  /var/log/nginx/access.log  main;
    access_log off;
    tcp_nopush on;
    tcp_nodelay on;


    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  0;
#    keepalive_timeout  65;
    keepalive_requests 100000;
    reset_timedout_connection on;
    client_body_timeout 10;

    server_names_hash_bucket_size  64;
#    server_names_hash_max_size 700;

    gzip  on;
    gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
    gzip_min_length 1100;
    gzip_buffers 64 8k;
    gzip_comp_level 3;
    gzip_http_version 1.1;
    gzip_proxied any;
#    gzip_types text/plain application/xml application/x-javascript text/css;
    gzip_disable "MSIE [1-6]\.";
    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/sites-enabled/*.conf;

}

SimbioS
() автор топика
Ответ на: комментарий от anonymous
location ~ \.php {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # A handy function that became available in 0.7.31 that breaks down
        # The path information based on the provided regex expression
        # This is handy for requests such as file.php/some/paths/here/
#       error_page 404 @404;
#       fastcgi_intercept_errors on;

        fastcgi_param  APPLICATION_ENV          production;
        fastcgi_param  PATH_INFO          $fastcgi_path_info;
        fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_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  SCRIPT_NAME        $fastcgi_script_name;
#        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
#        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name$fastcgi_path_info;
        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_pass    unix:/var/run/php5-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_buffer_size 256k;
        fastcgi_buffers 4 512k;
        fastcgi_busy_buffers_size 512k;
        fastcgi_read_timeout 350;

}
SimbioS
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.