diff --git a/docker/sympa/Dockerfile b/docker/sympa/Dockerfile index 2d1ec7d095986d597ec986a874803bd7821393cf..84d0415bf7367915c1350675dff56d809a485e52 100644 --- a/docker/sympa/Dockerfile +++ b/docker/sympa/Dockerfile @@ -10,14 +10,12 @@ RUN apt-get -y update && apt-get -y upgrade && apt-get -y install \ libfcgi-perl \ nullmailer \ openssh-server \ + spawn-fcgi \ sudo \ supervisor RUN apt-get -y install --no-install-recommends sympa -RUN a2enconf sympa-soap - -RUN a2enconf sympa RUN touch /var/log/sympa.log && chown sympa:sympa /var/log/sympa.log && chmod 640 /var/log/sympa.log @@ -27,7 +25,7 @@ RUN cp -r /etc/sympa /etc/sympa.sample COPY default.conf /etc/apache2/sites-available/000-default.conf -RUN a2enmod rewrite substitute +RUN a2enmod rewrite substitute alias proxy proxy_fcgi COPY supervisord.conf /etc/supervisor/conf.d diff --git a/docker/sympa/default.conf b/docker/sympa/default.conf index 5538fa16ef2b732d2d120a929995a9d9a4a0167e..973f0cd07559426e6e415b30f0898aa429ee8dee 100644 --- a/docker/sympa/default.conf +++ b/docker/sympa/default.conf @@ -20,37 +20,23 @@ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined - # Sympa pretty urls - RewriteEngine on - # Do not redirect static, css and pictures - RewriteCond %{REQUEST_URI} !^/(static|css|pictures)-sympa/.* - RewriteCond %{REQUEST_URI} !^/sympasoap.* - # Avoid redirect loops - RewriteCond %{REQUEST_URI} !^/wws.* - # Prepend wws - RewriteRule (.*) /wws$1 [PT,QSA] - - # Remove /wws/ in html output - <Location "/"> - AddOutputFilterByType SUBSTITUTE text/html - Substitute "s|/wws/|/|" - </Location> - - # Hide direct access to /wws with 307 to preserve data and method - RewriteCond %{REQUEST_URI} ^/wws.* - RewriteCond %{REQUEST_URI} !^/(static|css|pictures)-sympa/.* - RewriteCond %{REQUEST_URI} !^/sympasoap.* - RewriteRule /wws(.*) $1 [L,QSA,R=307] - - # For debug purposes, uncomment this line - # LogLevel alert rewrite:trace6 substitute:trace6 - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf + + <Location /static-sympa> + Require all granted + </Location> + Alias /static-sympa /usr/share/sympa/static_content/ + + <Location /sympasoap> + SetHandler "proxy:unix:/var/run/sympa/sympasoap.socket|fcgi://" + Require all granted + </Location> + + + <Location /sympa> + SetHandler "proxy:unix:/var/run/sympa/wwsympa.socket|fcgi://" + Require all granted + </Location> + </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/docker/sympa/supervisord.conf b/docker/sympa/supervisord.conf index 5a227d2b986d63dfeaca97f5162539c484f2aedb..547f552c075b586fd6a789880386972d7f04ed8f 100644 --- a/docker/sympa/supervisord.conf +++ b/docker/sympa/supervisord.conf @@ -95,3 +95,24 @@ stdout_logfile_maxbytes=0 stderr_logfile_maxbytes=0 stdout_logfile=/dev/stdout stderr_logfile=/dev/stderr + +[program:wwsympa] +command=/usr/bin/spawn-fcgi -n -F 5 -P /var/run/sympa/wwsympa.pid -u sympa -g sympa -s /var/run/sympa/wwsympa.socket -M 0600 -U www-data -- /usr/lib/cgi-bin/sympa/wwsympa.fcgi +autostart=true +stdout_events_enabled=true +stderr_events_enabled=true +stdout_logfile_maxbytes=0 +stderr_logfile_maxbytes=0 +stdout_logfile=/dev/stdout +stderr_logfile=/dev/stderr + + +[program:wwsympasoap] +command=/usr/bin/spawn-fcgi -n -F 5 -P /var/run/sympa/sympasoap.pid -u sympa -g sympa -s /var/run/sympa/sympasoap.socket -M 0600 -U www-data -- /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi +autostart=true +stdout_events_enabled=true +stderr_events_enabled=true +stdout_logfile_maxbytes=0 +stderr_logfile_maxbytes=0 +stdout_logfile=/dev/stdout +stderr_logfile=/dev/stderr