diff --git a/doc/nginx/sites-available-haproxy/authentic.conf b/doc/nginx/sites-available-haproxy/authentic.conf new file mode 100644 index 0000000..c3599e5 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/authentic.conf @@ -0,0 +1,37 @@ +server { + listen 80; + listen [::]:80; + + server_name ~^connexion.* ~^authentic-.*; + + access_log /var/log/nginx/authentic2-multitenant-access.log combined_full; + error_log /var/log/nginx/authentic2-multitenant-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/authentic2-multitenant/tenants/$host/static/$1 + /var/lib/authentic2-multitenant/tenants/$host/theme/static/$1 + /var/lib/authentic2-multitenant/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/authentic2-multitenant/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/authentic2-multitenant/www/robots.txt; + } + + location / { + add_header 'Access-Control-Allow-Origin' '*'; + proxy_pass http://unix:/var/run/authentic2-multitenant/authentic2-multitenant.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/bijoe.conf b/doc/nginx/sites-available-haproxy/bijoe.conf new file mode 100644 index 0000000..cadaef7 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/bijoe.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^bijoe.*; + + access_log /var/log/nginx/bijoe-access.log combined_full; + error_log /var/log/nginx/bijoe-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/bijoe/tenants/$host/static/$1 + /var/lib/bijoe/tenants/$host/theme/static/$1 + /var/lib/bijoe/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/bijoe/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/bijoe/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/bijoe/bijoe.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/chrono.conf b/doc/nginx/sites-available-haproxy/chrono.conf new file mode 100644 index 0000000..fc3c958 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/chrono.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^agenda.* ~^agendas.*; + + access_log /var/log/nginx/chrono-access.log combined_full; + error_log /var/log/nginx/chrono-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/chrono/tenants/$host/static/$1 + /var/lib/chrono/tenants/$host/theme/static/$1 + /var/lib/chrono/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/chrono/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/chrono/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/chrono/chrono.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/combo.conf b/doc/nginx/sites-available-haproxy/combo.conf new file mode 100644 index 0000000..50dd17d --- /dev/null +++ b/doc/nginx/sites-available-haproxy/combo.conf @@ -0,0 +1,36 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + server_name ~^mon.* ~^agents.*; + + access_log /var/log/nginx/combo-access.log combined_full; + error_log /var/log/nginx/combo-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/combo/tenants/$host/static/$1 + /var/lib/combo/tenants/$host/theme/static/$1 + /var/lib/combo/collectstatic/$1 + =404; + add_header 'Access-Control-Allow-Origin' '*'; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/combo/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/combo/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/combo/combo.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/corbo.conf b/doc/nginx/sites-available-haproxy/corbo.conf new file mode 100644 index 0000000..5929499 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/corbo.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^corbo.*; + + access_log /var/log/nginx/corbo-access.log combined_full; + error_log /var/log/nginx/corbo-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/corbo/tenants/$host/static/$1 + /var/lib/corbo/tenants/$host/theme/static/$1 + /var/lib/corbo/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/corbo/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/corbo/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/corbo/corbo.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/fargo.conf b/doc/nginx/sites-available-haproxy/fargo.conf new file mode 100644 index 0000000..84a26b6 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/fargo.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^portedoc.* ~^porte-doc.*; + + access_log /var/log/nginx/fargo-access.log combined_full; + error_log /var/log/nginx/fargo-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/fargo/tenants/$host/static/$1 + /var/lib/fargo/tenants/$host/theme/static/$1 + /var/lib/fargo/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/fargo/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/fargo/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/fargo/fargo.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/hobo.conf b/doc/nginx/sites-available-haproxy/hobo.conf new file mode 100644 index 0000000..94db225 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/hobo.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^hobo.*; + + access_log /var/log/nginx/hobo-access.log combined_full; + error_log /var/log/nginx/hobo-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/hobo/tenants/$host/static/$1 + /var/lib/hobo/tenants/$host/theme/static/$1 + /var/lib/hobo/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/hobo/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/hobo/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/hobo/hobo.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/mandayejs.conf b/doc/nginx/sites-available-haproxy/mandayejs.conf new file mode 100644 index 0000000..afc19ab --- /dev/null +++ b/doc/nginx/sites-available-haproxy/mandayejs.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^mandayejs.*; + + access_log /var/log/nginx/mandayejs-access.log combined_full; + error_log /var/log/nginx/mandayejs-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/mandayejs/tenants/$host/static/$1 + /var/lib/mandayejs/tenants/$host/theme/static/$1 + /var/lib/mandayejs/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/mandayejs/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/mandayejs/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/mandayejs/mandayejs.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/passerelle.conf b/doc/nginx/sites-available-haproxy/passerelle.conf new file mode 100644 index 0000000..1f774f2 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/passerelle.conf @@ -0,0 +1,35 @@ +server { + listen 80; + listen [::]:80; + server_name ~^passerelle.*; + + access_log /var/log/nginx/passerelle-access.log combined_full; + error_log /var/log/nginx/passerelle-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/passerelle/tenants/$host/static/$1 + /var/lib/passerelle/tenants/$host/theme/static/$1 + /var/lib/passerelle/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/passerelle/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/passerelle/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/passerelle/passerelle.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/wcs.conf b/doc/nginx/sites-available-haproxy/wcs.conf new file mode 100644 index 0000000..752afc5 --- /dev/null +++ b/doc/nginx/sites-available-haproxy/wcs.conf @@ -0,0 +1,36 @@ +server { + listen 80; + listen [::]:80; + server_name ~^demarches.* ~^formulaires.*; + + access_log /var/log/nginx/wcs-access.log combined_full; + error_log /var/log/nginx/wcs-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/wcs/$host/static/$1 + /var/lib/wcs/$host/theme/static/$1 + /var/lib/wcs/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/wcs/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/wcs/www/robots.txt; + } + + location / { + add_header 'Access-Control-Allow-Origin' '*'; + proxy_pass http://unix:/var/run/wcs/wcs.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available-haproxy/welco.conf b/doc/nginx/sites-available-haproxy/welco.conf new file mode 100644 index 0000000..3d155ea --- /dev/null +++ b/doc/nginx/sites-available-haproxy/welco.conf @@ -0,0 +1,36 @@ +server { + listen 80; + listen [::]:80; + server_name ~^welco.*; + + + access_log /var/log/nginx/welco-access.log combined_full; + error_log /var/log/nginx/welco-error.log; + + location ~ ^/static/(.+)$ { + root /; + try_files /var/lib/welco/tenants/$host/static/$1 + /var/lib/welco/tenants/$host/theme/static/$1 + /var/lib/welco/collectstatic/$1 + =404; + } + + location ~ ^/media/(.+)$ { + alias /var/lib/welco/tenants/$host/media/$1; + } + + location /robots.txt { + alias /var/lib/welco/www/robots.txt; + } + + location / { + proxy_pass http://unix:/var/run/welco/welco.sock; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-SSL on; + proxy_set_header X-Forwarded-Protocol ssl; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } +} diff --git a/doc/nginx/sites-available/0_http-to-https.conf b/doc/nginx/sites-available/0_http-to-https.conf new file mode 100644 index 0000000..709628f --- /dev/null +++ b/doc/nginx/sites-available/0_http-to-https.conf @@ -0,0 +1,10 @@ +server { + listen 80 default_server; + server_name ~.*; + + access_log /var/log/nginx/http-to-https-access.log combined_full; + error_log /var/log/nginx/http-to-https-error.log; + + return 302 https://$host$request_uri; +} + diff --git a/doc/nginx/sites-available/authentic.conf b/doc/nginx/sites-available/authentic.conf index 2dc442f..33703e5 100644 --- a/doc/nginx/sites-available/authentic.conf +++ b/doc/nginx/sites-available/authentic.conf @@ -1,41 +1,3 @@ -server { - listen 80; - listen [::]:80; - - server_name ~^connexion.* ~^authentic-.*; - - access_log /var/log/nginx/authentic2-multitenant-access.log combined_full; - error_log /var/log/nginx/authentic2-multitenant-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/authentic2-multitenant/tenants/$host/static/$1 - /var/lib/authentic2-multitenant/tenants/$host/theme/static/$1 - /var/lib/authentic2-multitenant/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/authentic2-multitenant/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/authentic2-multitenant/www/robots.txt; - } - - location / { - add_header 'Access-Control-Allow-Origin' '*'; - proxy_pass http://unix:/var/run/authentic2-multitenant/authentic2-multitenant.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/bijoe.conf b/doc/nginx/sites-available/bijoe.conf index f42b212..8cef943 100644 --- a/doc/nginx/sites-available/bijoe.conf +++ b/doc/nginx/sites-available/bijoe.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^bijoe.*; - - access_log /var/log/nginx/bijoe-access.log combined_full; - error_log /var/log/nginx/bijoe-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/bijoe/tenants/$host/static/$1 - /var/lib/bijoe/tenants/$host/theme/static/$1 - /var/lib/bijoe/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/bijoe/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/bijoe/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/bijoe/bijoe.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/chrono.conf b/doc/nginx/sites-available/chrono.conf index d6bf74d..27bb40d 100644 --- a/doc/nginx/sites-available/chrono.conf +++ b/doc/nginx/sites-available/chrono.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^agenda.* ~^agendas.*; - - access_log /var/log/nginx/chrono-access.log combined_full; - error_log /var/log/nginx/chrono-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/chrono/tenants/$host/static/$1 - /var/lib/chrono/tenants/$host/theme/static/$1 - /var/lib/chrono/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/chrono/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/chrono/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/chrono/chrono.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/combo.conf b/doc/nginx/sites-available/combo.conf index 3c25a22..de76b23 100644 --- a/doc/nginx/sites-available/combo.conf +++ b/doc/nginx/sites-available/combo.conf @@ -1,40 +1,3 @@ -server { - listen 80 default_server; - listen [::]:80 default_server; - server_name ~^mon.* ~^agents.*; - - access_log /var/log/nginx/combo-access.log combined_full; - error_log /var/log/nginx/combo-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/combo/tenants/$host/static/$1 - /var/lib/combo/tenants/$host/theme/static/$1 - /var/lib/combo/collectstatic/$1 - =404; - add_header 'Access-Control-Allow-Origin' '*'; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/combo/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/combo/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/combo/combo.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl default_server; listen [::]:443 ssl default_server; diff --git a/doc/nginx/sites-available/corbo.conf b/doc/nginx/sites-available/corbo.conf index 6030184..626dcb5 100644 --- a/doc/nginx/sites-available/corbo.conf +++ b/doc/nginx/sites-available/corbo.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^corbo.*; - - access_log /var/log/nginx/corbo-access.log combined_full; - error_log /var/log/nginx/corbo-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/corbo/tenants/$host/static/$1 - /var/lib/corbo/tenants/$host/theme/static/$1 - /var/lib/corbo/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/corbo/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/corbo/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/corbo/corbo.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/fargo.conf b/doc/nginx/sites-available/fargo.conf index d330e81..a002731 100644 --- a/doc/nginx/sites-available/fargo.conf +++ b/doc/nginx/sites-available/fargo.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^portedoc.* ~^porte-doc.*; - - access_log /var/log/nginx/fargo-access.log combined_full; - error_log /var/log/nginx/fargo-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/fargo/tenants/$host/static/$1 - /var/lib/fargo/tenants/$host/theme/static/$1 - /var/lib/fargo/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/fargo/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/fargo/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/fargo/fargo.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/hobo.conf b/doc/nginx/sites-available/hobo.conf index bb80844..7597977 100644 --- a/doc/nginx/sites-available/hobo.conf +++ b/doc/nginx/sites-available/hobo.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^hobo.*; - - access_log /var/log/nginx/hobo-access.log combined_full; - error_log /var/log/nginx/hobo-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/hobo/tenants/$host/static/$1 - /var/lib/hobo/tenants/$host/theme/static/$1 - /var/lib/hobo/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/hobo/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/hobo/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/hobo/hobo.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/mandayejs.conf b/doc/nginx/sites-available/mandayejs.conf index f292e03..eb637ed 100644 --- a/doc/nginx/sites-available/mandayejs.conf +++ b/doc/nginx/sites-available/mandayejs.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^mandayejs.*; - - access_log /var/log/nginx/mandayejs-access.log combined_full; - error_log /var/log/nginx/mandayejs-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/mandayejs/tenants/$host/static/$1 - /var/lib/mandayejs/tenants/$host/theme/static/$1 - /var/lib/mandayejs/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/mandayejs/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/mandayejs/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/mandayejs/mandayejs.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/passerelle.conf b/doc/nginx/sites-available/passerelle.conf index b3608f9..2f3b572 100644 --- a/doc/nginx/sites-available/passerelle.conf +++ b/doc/nginx/sites-available/passerelle.conf @@ -1,39 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^passerelle.*; - - access_log /var/log/nginx/passerelle-access.log combined_full; - error_log /var/log/nginx/passerelle-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/passerelle/tenants/$host/static/$1 - /var/lib/passerelle/tenants/$host/theme/static/$1 - /var/lib/passerelle/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/passerelle/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/passerelle/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/passerelle/passerelle.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl; diff --git a/doc/nginx/sites-available/wcs.conf b/doc/nginx/sites-available/wcs.conf index 528a1ca..b0fc9fd 100644 --- a/doc/nginx/sites-available/wcs.conf +++ b/doc/nginx/sites-available/wcs.conf @@ -1,40 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^demarches.* ~^formulaires.*; - - access_log /var/log/nginx/wcs-access.log combined_full; - error_log /var/log/nginx/wcs-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/wcs/$host/static/$1 - /var/lib/wcs/$host/theme/static/$1 - /var/lib/wcs/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/wcs/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/wcs/www/robots.txt; - } - - location / { - add_header 'Access-Control-Allow-Origin' '*'; - proxy_pass http://unix:/var/run/wcs/wcs.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443; listen [::]:443; diff --git a/doc/nginx/sites-available/welco.conf b/doc/nginx/sites-available/welco.conf index e8dc363..e9c9366 100644 --- a/doc/nginx/sites-available/welco.conf +++ b/doc/nginx/sites-available/welco.conf @@ -1,40 +1,3 @@ -server { - listen 80; - listen [::]:80; - server_name ~^welco.*; - - - access_log /var/log/nginx/welco-access.log combined_full; - error_log /var/log/nginx/welco-error.log; - - location ~ ^/static/(.+)$ { - root /; - try_files /var/lib/welco/tenants/$host/static/$1 - /var/lib/welco/tenants/$host/theme/static/$1 - /var/lib/welco/collectstatic/$1 - =404; - } - - location ~ ^/media/(.+)$ { - alias /var/lib/welco/tenants/$host/media/$1; - } - - location /robots.txt { - alias /var/lib/welco/www/robots.txt; - } - - location / { - proxy_pass http://unix:/var/run/welco/welco.sock; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - } -} - server { listen 443 ssl; listen [::]:443 ssl;