Configure HTTP server: Setup HTTP server as FastCGI proxy
Note
Instructions in this chepter are applied to the HTTP servers accompany with any of these setting methods:
They are not applied to servers with earlier (no longer recommended) methods.
If you have not added configuration for Sympa to HTTP server, follow instruction below.
Instruction by HTTP servers
nginx
-
Add following excerpt to nginx configuration (Note: replace
$PIDDIR,$CSSDIR,$PICTURESDIRand$STATICDIRbelow):server { listen 80; server_name localhost.localdomain; # Change it! location /sympa { include fastcgi_params; fastcgi_param SERVER_NAME $host; # See note fastcgi_pass unix:$PIDDIR/wwsympa.socket; } # Section below is needed for 6.2.28 or later. location /static-sympa/css { alias $CSSDIR; } # Section below is needed for 6.2.28 or later. location /static-sympa/pictures { alias $PICTURESDIR; } location /static-sympa { alias $STATICDIR; } }In above,
/static-sympa/css,/static-sympa/picturesand/static-sympaare the default values ofcss_url,pictures_urlandstatoc_content_url, respectively.For the SOAP interface, add this in your
serverconfiguration (Note: replace$PIDDIR):location /sympasoap { include fastcgi_params; fastcgi_param SERVER_NAME $host; # See note fastcgi_pass unix:$PIDDIR/sympasoap.socket; }See also the notes below.
Note
-
Some binary distributions ship configuration ready to edit:
- On RPM,
/etc/nginx/conf.d/sympa.conffile is prepared bysympa-nginxpackage.
- On RPM,
-
The line
fastcgi_param SERVER_NAME $host;afterincludeline is required if you will manage multiple virtual hosts, i.e.server_namedirective has multiple server names. -
With earlier version of Sympa, you may have to add following things:
-
With Sympa 6.2.54 or earlier, insert these into the section of "
location /sympa":fastcgi_split_path_info ^(/sympa)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info;and these into the section of "
location /sympasoap", if any:fastcgi_split_path_info ^(/sympasoap)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; -
Additionally, with Sympa 6.2.19b.2 or earlier, insert this into the section of "
location /sympa" (Note: replace$EXECCGIDIR).fastcgi_param SCRIPT_FILENAME $EXECCGIDIR/wwsympa.fcgi;
-
-
-
Edit it as you prefer.
Note that
server_namedirective above should contain host part ofwwsympa_urlparameter. Because Sympa refers toSERVER_NAMECGI environment variable to determine web host name of the service. -
Restart nginx. Then test configuration according to instruction.
Apache HTTP Server
-
Add following excerpt to httpd configuration (Note: replace
$PIDDIR,$CSSDIR,$PICTURESDIRand$STATICDIRbelow):LoadModule alias_module modules/mod_alias.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so ... <Location /sympa> SetHandler "proxy:unix:$PIDDIR/wwsympa.socket|fcgi://localhost" # Don't forget to edit lines below! Require local #Require all granted </Location> # Lines below are needed for 6.2.28 or later. <Location "/static-sympa/css"> Require all granted </Location> Alias /static-sympa/css $CSSDIR # Lines below are needed for 6.2.28 or later. <Location "/static-sympa/pictures"> Require all granted </Location> Alias /static-sympa/pictures $PICTURESDIR <Location /static-sympa> Require all granted </Location> Alias /static-sympa $STATICDIRFor SOAP interface, add:
<Location /sympasoap> SetHandler "proxy:unix:$PIDDIR/sympasoap.socket|fcgi://localhost" # Don't forget to edit lines below! Require local #Require all granted </Location>In above,
/static-sympa/css,/static-sympa/picturesand/static-sympaare the default values ofcss_url,pictures_urlandstatoc_content_url, respectively.Note
-
Some binary distributions ship configuration ready to edit:
-
On Debian (12 "bookworm" or later),
/etc/apache2/conf-available/sympa.conffile is prepared. Also, separate/etc/apache2/conf-available/sympa-soap.conffile is prepared for SympaSOAP feature.Note that you may have to enable
proxy_fcgiApache module by running:# a2enmod proxy_fcgi -
On RPM (RHEL/CentOS 7 or later and Fedora),
/etc/httpd/conf.d/sympa.conffile is prepared bysympa-httpdpackage.
-
-
-
Edit it as you prefer.
Note that
ServerNamedirective above should contain host part ofwwsympa_urlparameter. Because Sympa refers toSERVER_NAMECGI environment variable to determine web host name of the service. -
Restart httpd. Then test configuration according to instruction.
lighttpd
-
Add following excerpt to lighttpd configuration (Note: replace
$PIDDIR,$CSSDIR,$PICTURESDIRand$STATICDIR):server.modules += ("mod_fastcgi") server.modules += ("mod_alias") # Line below is needed for 6.2.28 or later. alias.url += ( "/static-sympa/css/" => "$CSSDIR/" ) # Line below is needed for 6.2.28 or later. alias.url += ( "/static-sympa/pictures/" => "$PICTURESDIR/" ) alias.url += ( "/static-sympa/" => "$STATICDIR/" ) $HTTP["url"] =~ "^/sympa" { fastcgi.server = ( "/sympa" => (( "check-local" => "disable", "socket" => "$PIDDIR/wwsympa.socket", )) ) }In above,
/static-sympa/css,/static-sympa/picturesand/static-sympaare the default values ofcss_url,pictures_urlandstatoc_content_url, respectively. -
Edit it as you prefer.
-
Restart lighttpd. Then test configuration according to instruction.