3

私はnginxとfcgiwrapを使ってDebianでOTRSを実行しようとしています。しかし、私が得るのはこのエラーだけです:

FastCGI sent in stderr: "Cannot get script name, is DOCUMENT_ROOT and SCRIPT_NAME set 
and is the script executable?" while reading response header from upstream, 
client: 123.123.123.123, 
server: support.example.com, 
request: "GET /otrs/index.pl HTTP/1.1", 
upstream: "fastcgi://unix:/var/www/sockets/fcgiwrap.socket:", 
host: "support.example.com", referrer: "http://support.examle.com/"

これが私の設定です:

server {
    server_name support.example.com;

    access_log      /var/www/support/log/access.log;
    access_log      /var/log/nginx/access.log;
    error_log       /var/www/support/log/error.log info;

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;

    root /var/www/support/otrs/var/httpd/htdocs;

    index index.html;

    location = /favicon.ico {
            access_log      off;
            log_not_found   off;
    }

    location /otrs-web/ {
            alias /var/www/support/otrs/var/httpd/htdocs;
    }

    location ~ ^/otrs/(.*\.pl)(/.*)?$ {
            gzip off;

            fastcgi_pass unix:/var/www/sockets/fcgiwrap.socket;

            fastcgi_index index.pl;

            fastcgi_param SCRIPT_FILENAME /var/www/support/otrs/bin/fcgi-bin/$1;

            include fastcgi_params;

    }
}

およびfastcgi_params:

fastcgi_connect_timeout 65;
fastcgi_send_timeout    180;
fastcgi_read_timeout    180;

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_FILENAME         $request_filename;
fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
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/$nginx_version;

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   HTTPS                   $https;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param   REDIRECT_STATUS         200;
4

1 に答える 1

0

これはおそらく、debian スクイーズ (1.0-1+squeeze1) で見つかった fcgiwrap のバージョンのバグです。http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698071を参照してください。

fcgiwrap 1.0.3-3 にアップグレードすると、問題が解決しました。

于 2013-01-14T09:56:06.577 に答える