CGI response error on nginx server using fcgiwrap

I have a nginx server running on debian wheezy . OTRS installation works for me. But our old perl-fcgi wrapper interfered with some other important process, so we decided to choose the fcgiwrap package : http://www.haschmi.de/de/otrs/otrs-on-nginx.html

So, I removed the old shell and installed a new one. The old wrapper had

fastcgi_pass 127.0.0.1:8999; 

and new

 fastcgi_pass unix:/var/run/fcgiwrap.socket; 

Here is the complete configuration

 server { listen ip:80; server_name support.test.com; root /opt/otrs/var/httpd/htdocs; index index.html; location /otrs-web { gzip on; alias /opt/otrs/var/httpd/htdocs; } location ~ ^/otrs/(.*\.pl)(/.*)?$ { #try_files $uri =404; gzip off; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.pl; fastcgi_param SCRIPT_FILENAME /opt/otrs/bin/fcgi-bin/$1; 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 GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; 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 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; } } 

When I visit our OTRS, everything works. But as a son, when I submit the login form, I get

 An error occurred while reading CGI reply (no response received) 

Any ideas what is wrong? How can i solve this?

+6
source share
1 answer

Current Ubuntu reps (12.04) do not contain the correct version of fcgiwrap.

You need to compile fcgiwrap directly from https://github.com/gnosek/fcgiwrap and use the -f option to start the shell. This will force err_log to be redirected to the error.log server. To change the fcgiwrap startup options, edit /etc/init.d/fcgiwrap and uncomment / change the following line:

 DAEMON_OPTS="-f" 

Restart fcgiwrap after this:

 service fcgiwrap restart 
+7
source

Source: https://habr.com/ru/post/923641/


All Articles