Commit 034f07e870b8c0c709d2f6be11ead771b386eb6e
1 parent
ae35908e
Exists in
master
and in
90 other branches
Mailman web ui
Showing
6 changed files
with
71 additions
and
1 deletions
Show diff stats
config/roles/integration_server.rb
@@ -3,4 +3,4 @@ description "Server that runs COLAB (user authentication, visual integration and | @@ -3,4 +3,4 @@ description "Server that runs COLAB (user authentication, visual integration and | ||
3 | 3 | ||
4 | # TODO colab and mailman-api should be able to run in separate hosts at some | 4 | # TODO colab and mailman-api should be able to run in separate hosts at some |
5 | # point in the future | 5 | # point in the future |
6 | -run_list 'recipe[mailman-api]', 'recipe[mailman]', 'recipe[colab]', 'recipe[basics::nginx]', 'recipe[colab::nginx]' | 6 | +run_list 'recipe[mailman-api]', 'recipe[mailman]', 'recipe[mailman::webui]', 'recipe[colab]', 'recipe[basics::nginx]', 'recipe[colab::nginx]' |
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +if node['platform'] == 'centos' | ||
2 | + cookbook_file '/etc/yum.repos.d/mailman.repo' do | ||
3 | + owner 'root' | ||
4 | + mode 0644 | ||
5 | + end | ||
6 | +end | ||
7 | + | ||
8 | +package 'fcgiwrap' | ||
9 | +package 'spawn-fcgi' | ||
10 | + | ||
11 | +hostname = node['config']['lists_hostname'] | ||
12 | +template "/etc/nginx/conf.d/#{hostname}.conf" do | ||
13 | + source 'mailman.conf.erb' | ||
14 | + owner 'root' | ||
15 | + group 'root' | ||
16 | + mode 0644 | ||
17 | + notifies :restart, 'service[nginx]' | ||
18 | +end | ||
19 | + | ||
20 | +cookbook_file '/etc/sysconfig/spawn-fcgi' do | ||
21 | + owner 'root' | ||
22 | + group 'root' | ||
23 | + mode 0644 | ||
24 | + notifies :restart, 'service[spawn-fcgi]' | ||
25 | +end | ||
26 | + | ||
27 | +service 'spawn-fcgi' do | ||
28 | + action [:enable, :start] | ||
29 | + supports :restart => true | ||
30 | +end |
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +server { | ||
2 | + server_name <%= node['config']['lists_hostname'] %>; | ||
3 | + listen 80; | ||
4 | + | ||
5 | + location = / { | ||
6 | + rewrite ^ /mailman/cgi-bin/listinfo permanent; | ||
7 | + } | ||
8 | + | ||
9 | + location / { | ||
10 | + rewrite ^ /mailman/cgi-bin$uri?$args; | ||
11 | + } | ||
12 | + | ||
13 | + location /mailman/cgi-bin/ { | ||
14 | + root /usr/lib/; | ||
15 | + fastcgi_split_path_info (^/mailman/cgi-bin/[^/]*)(.*)$; | ||
16 | + include /etc/nginx/fastcgi_params; | ||
17 | + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
18 | + fastcgi_param PATH_INFO $fastcgi_path_info; | ||
19 | + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
20 | + fastcgi_intercept_errors on; | ||
21 | + fastcgi_pass unix:/var/run/fcgiwrap.socket; | ||
22 | + } | ||
23 | + location /icons { | ||
24 | + alias /usr/lib/mailman/icons; | ||
25 | + } | ||
26 | + location /pipermail { | ||
27 | + alias /var/lib/mailman/archives/public; | ||
28 | + autoindex on; | ||
29 | + } | ||
30 | +} |
cookbooks/mailman/templates/centos/mm_cfg.py.erb
@@ -20,6 +20,7 @@ DEFAULT_URL_HOST = '<%= node['config']['external_hostname'] %>' | @@ -20,6 +20,7 @@ DEFAULT_URL_HOST = '<%= node['config']['external_hostname'] %>' | ||
20 | DEFAULT_EMAIL_HOST = '<%= node['config']['lists_hostname'] %>' | 20 | DEFAULT_EMAIL_HOST = '<%= node['config']['lists_hostname'] %>' |
21 | MTA = None | 21 | MTA = None |
22 | POSTFIX_STYLE_VIRTUAL_DOMAINS = ['<%= node['config']['lists_hostname']%>'] | 22 | POSTFIX_STYLE_VIRTUAL_DOMAINS = ['<%= node['config']['lists_hostname']%>'] |
23 | +DEFAULT_URL_PATTERN = 'http://%s/mailman/cgi-bin/' | ||
23 | 24 | ||
24 | ############################################################### | 25 | ############################################################### |
25 | # copied from default mailman config file | 26 | # copied from default mailman config file |