mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
nginx - group proxypass to apache together
This commit is contained in:
parent
2833bb1654
commit
4047894ab6
17 changed files with 50 additions and 55 deletions
|
@ -48,6 +48,53 @@
|
|||
name: uwsgi
|
||||
state: started
|
||||
enabled: True
|
||||
- name: Install ports.conf when nginx_enabled, from templates
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- { src: 'ports.conf' , dest: '/etc/{{ apache_service }}/' , mode: '0644' }
|
||||
when: is_debuntu | bool and nginx_enabled | bool
|
||||
|
||||
- name: Install /etc/nginx/conf.d/elgg-nginx.conf from template
|
||||
template:
|
||||
src: elgg-nginx.conf
|
||||
dest: "/etc/nginx/conf.d/elgg-nginx.conf"
|
||||
when: elgg_enabled | bool
|
||||
|
||||
- name: Install /etc/nginx/lokole-nginx.conf from template
|
||||
template:
|
||||
src: lokole-nginx.conf.j2
|
||||
dest: "/etc/nginx/conf.d/lokole-nginx.conf"
|
||||
when: lokole_enabled | bool
|
||||
|
||||
- name: Install MediaWiki's nginx conf.d file from template
|
||||
template:
|
||||
src: mediawiki-nginx.conf.j2
|
||||
dest: /etc/nginx/conf.d/mediawiki-nginx.conf
|
||||
when: mediawiki_enabled | bool
|
||||
|
||||
- name: Install WordPress's nginx conf.d file from template
|
||||
template: src=nextcloud-nginx.conf dest=/etc/nginx/conf.d/nextcloud-nginx.conf
|
||||
when: nextcloud_enabled | bool
|
||||
|
||||
- name: Install NodeRed's nginx conf.d file from template
|
||||
template:
|
||||
src: nodered-nginx.conf.j2
|
||||
dest: /etc/nginx/conf.d/nodered-nginx.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0666
|
||||
when: nodered_enabled | bool
|
||||
|
||||
- name: Install WordPress's nginx conf.d file from template
|
||||
template:
|
||||
src: wordpress-nginx.conf
|
||||
dest: /etc/nginx/conf.d/
|
||||
when: wordpress_enabled | bool
|
||||
|
||||
- name: Make sure nginx picks up the config
|
||||
service:
|
||||
|
|
3
roles/nginx/templates/elgg-nginx.conf
Normal file
3
roles/nginx/templates/elgg-nginx.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
location /elgg {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/elgg;
|
||||
}
|
3
roles/nginx/templates/lokole-nginx.conf.j2
Normal file
3
roles/nginx/templates/lokole-nginx.conf.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
location /lokole {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/lokole;
|
||||
}
|
11
roles/nginx/templates/mediawiki-nginx.conf.j2
Normal file
11
roles/nginx/templates/mediawiki-nginx.conf.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
location /mediawiki {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/mediawiki;
|
||||
}
|
||||
location ~ /mediawiki/.*\.php$ {
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }};
|
||||
|
||||
}
|
11
roles/nginx/templates/nextcloud-nginx.conf
Normal file
11
roles/nginx/templates/nextcloud-nginx.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
location /nextcloud {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/nextcloud;
|
||||
}
|
||||
|
||||
location ~ /nextcloud/.*\.php$ {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }};
|
||||
}
|
||||
|
3
roles/nginx/templates/nodered-nginx.conf.j2
Normal file
3
roles/nginx/templates/nodered-nginx.conf.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
location /nodered {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/nodered;
|
||||
}
|
15
roles/nginx/templates/ports.conf
Normal file
15
roles/nginx/templates/ports.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
# If you just change the port or add more ports here, you will likely also
|
||||
# have to change the VirtualHost statement in
|
||||
# /etc/apache2/sites-enabled/000-default.conf
|
||||
|
||||
Listen {{ apache_port }}
|
||||
|
||||
#<IfModule ssl_module>
|
||||
# Listen 443
|
||||
#</IfModule>
|
||||
|
||||
#<IfModule mod_gnutls.c>
|
||||
# Listen 443
|
||||
#</IfModule>
|
||||
|
||||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
11
roles/nginx/templates/wordpress-nginx.conf
Normal file
11
roles/nginx/templates/wordpress-nginx.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
location /wordpress {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}/wordpress;
|
||||
}
|
||||
location ~ /wordpress/.*\.php$ {
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue