Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.3 KiB

  1. # based on https://gist.github.com/bjacint/7862912
  2. root /usr/lib/cgi-bin/sympa;
  3. error_page 403 500 502 503 504 /50x.html;
  4. rewrite ^/$ /wws permanent;
  5. # While configuring sympa, you should specify wwsympa_url for each robot.
  6. # if you do not do so, sympa will generate wwsympa_url as ${robot_name}/sympa.
  7. # So to prevent non-active urls for robots without wwsympa_url, we do this redirect:
  8. rewrite ^/sympa/(.*)$ /wws/$1 permanent;
  9. location ^~ /static-sympa/ {
  10. alias /var/lib/sympa/static_content/;
  11. access_log off;
  12. }
  13. location /50x.html {
  14. root /usr/share/nginx/html;
  15. }
  16. location ~* \.(php|pl|py|jsp|asp|sh|cgi|bin|csh|ksh|out|run|o)$ {
  17. deny all;
  18. }
  19. location ~ /\.ht {
  20. deny all;
  21. }
  22. location /wws {
  23. gzip off;
  24. fastcgi_pass unix:/run/fcgiwrap.socket;
  25. fastcgi_split_path_info ^(/wws)(.+)$;
  26. fastcgi_param QUERY_STRING $query_string;
  27. fastcgi_param REQUEST_METHOD $request_method;
  28. fastcgi_param CONTENT_TYPE $content_type;
  29. fastcgi_param CONTENT_LENGTH $content_length;
  30. fastcgi_param PATH_INFO $fastcgi_path_info;
  31. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  32. fastcgi_param REQUEST_URI $request_uri;
  33. fastcgi_param DOCUMENT_URI $document_uri;
  34. fastcgi_param DOCUMENT_ROOT $document_root;
  35. fastcgi_param SERVER_PROTOCOL $server_protocol;
  36. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  37. fastcgi_param SERVER_SOFTWARE nginx;
  38. fastcgi_param REMOTE_ADDR $remote_addr;
  39. fastcgi_param REMOTE_PORT $remote_port;
  40. fastcgi_param SERVER_ADDR $server_addr;
  41. fastcgi_param SERVER_PORT $server_port;
  42. # According to RFC3875 (https://tools.ietf.org/html/rfc3875#section-4.1.14) in SERVER_NAME
  43. # we should put an actual hostname user came to. For nginx it is in $host
  44. # This will allow to run sympa multihost instances
  45. fastcgi_param SERVER_NAME $host;
  46. fastcgi_param REMOTE_USER $remote_user;
  47. fastcgi_param SCRIPT_FILENAME $document_root/wwsympa-wrapper.fcgi;
  48. fastcgi_param HTTP_HOST $http_host;
  49. fastcgi_intercept_errors on;
  50. }