问题描述
我有一个 nginx服务器在debian wheezy上运行.我正在安装 OTRS .但是我们以前的 perl-fcgi包装器正在干扰其他一些重要过程,因此我们决定选择 fcgiwrap软件包:http://www.haschmi.de/de/otrs/otrs-on-nginx.html
I have a nginx server running on debian wheezy. I have working OTRS installation. But our old perl-fcgi wrapper was interferring with some other important process so we desided to choose fcgiwrap package: http://www.haschmi.de/de/otrs/otrs-on-nginx.html
因此,我卸下了旧包装纸,并安装了新包装纸.旧包装纸有
So I removed the old wrapper and installed the new one. The old wrapper had
fastcgi_pass 127.0.0.1:8999;
和新的
fastcgi_pass unix:/var/run/fcgiwrap.socket;
这是完整的配置
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;
}
}
当我访问OTRS时,一切正常.但是当我提交登录表单时,我得到了
When I visit our OTRS everything works. But as son as 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?
推荐答案
当前的Ubuntu代表(12.04)没有包含适当的fcgiwrap版本.
The current Ubuntu reps (12.04) do not include a proper fcgiwrap version.
您需要直接从 https://github.com/gnosek/fcgiwrap 编译并使用-f选项运行包装器.这将导致err_log重定向到服务器error.log.要更改fcgiwrap启动选项,请编辑/etc/init.d/fcgiwrap 并取消注释/修改以下行:
You need to compile fcgiwrap directly from https://github.com/gnosek/fcgiwrap and use -f option to run the wrapper. It will cause the err_log to be redirected to server error.log. To change fcgiwrap startup options edit /etc/init.d/fcgiwrap and uncomment/modify the following line:
DAEMON_OPTS="-f"
在此之后重新启动fcgiwrap:
Restart fcgiwrap after this:
service fcgiwrap restart
这篇关于使用fcgiwrap在Nginx服务器上的CGI回复错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!