Welcome! Log In Create A New Profile

Advanced

Please help migrating Sympa from Apache to Nginx

Posted by terminus 
Please help migrating Sympa from Apache to Nginx
January 13, 2012 10:44AM
I am trying to set up the mailing list software Sympa with Nginx. Under Apache, it is a FastCGI process which works like this:

<VirtualHost lists.tld.org:80>
ServerName lists.tld.org
<IfModule mod_fastcgi.c>
<Location /wws>
SetHandler fastcgi-script
</Location>
ScriptAlias /wws /usr/lib/cgi-bin/sympa/wwsympa.fcgi
</IfModule>
</VirtualHost>

The Sympa documentation does give an example for Nginx:

server {
server_name lists.tld.org;

location / {
fastcgi_pass unix:/tmp/php-cgi/php-cgi.socket;
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 PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param SERVER_NAME $server_name;
}
}

But this must be incomplete, because it gives me the "No input file specified" error. Can anyone point me in the right direction?

Thanks!
Re: Please help migrating Sympa from Apache to Nginx
January 15, 2012 09:32AM
To answer my own message, I've made a bit of progress now through trial and error, but still not quite there. Here's what I have now:

server {
server_name lists.tld.org;
root /usr/lib/cgi-bin/sympa;

location /static-sympa {
alias /var/lib/sympa/static_content;
}

location / {
gzip off;
fastcgi_split_path_info ^(/)(.+)$;
fastcgi_param SCRIPT_FILENAME $document_root/wwsympa-wrapper.fcgi;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}

What this should do is that when you load http://lists.tld.org/info/listname, it should pass "info/listname" on to the script through PATH_INFO. When I check the Nginx logs, PATH_INFO does equal "info/listname". But the script ignores it, and just loads the main page! With Apache, it works.
Re: Please help migrating Sympa from Apache to Nginx
January 15, 2012 09:48AM
Sorry, I was close to fixing it but not quite - here is the version that works:

server {
server_name lists.tld.org;
root /usr/lib/cgi-bin/sympa;

location /static-sympa {
alias /var/lib/sympa/static_content;
}

location / {
gzip off;
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 PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SCRIPT_FILENAME $document_root/wwsympa-wrapper.fcgi;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 159
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready