Consolidate nginx configs

This commit is contained in:
Disassembler 2018-01-08 15:27:29 +01:00
parent bb7171f3e1
commit df000f4473
25 changed files with 90 additions and 143 deletions

View File

@ -1,12 +1,10 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
listen [::]:80 default_server ipv6only=off;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server ipv6only=off;
add_header Strict-Transport-Security "max-age=31536000;";

View File

@ -18,6 +18,5 @@ rc-update add ckan-datapusher boot
service ckan-datapusher start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/ckan-datapusher /etc/nginx/apps/ckan-datapusher
cp ${SOURCE_DIR}/etc/nginx/conf.d/ckan-datapusher.conf /etc/nginx/conf.d/ckan-datapusher.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/ckan-datapusher.access.log;
error_log /var/log/nginx/ckan-datapusher.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9004;
}

View File

@ -1,5 +1,13 @@
server {
listen 127.0.0.1:8004;
listen [::1]:8004;
include apps/ckan-datapusher;
listen [::1]:8004 ipv6only=off;
access_log /var/log/nginx/ckan-datapusher.access.log;
error_log /var/log/nginx/ckan-datapusher.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9004;
}
}

View File

@ -48,7 +48,6 @@ rc-update add ckan boot
service ckan start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/ckan /etc/nginx/apps/ckan
cp ${SOURCE_DIR}/etc/nginx/conf.d/ckan.conf /etc/nginx/conf.d/ckan.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/ckan.access.log;
error_log /var/log/nginx/ckan.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9003;
}

View File

@ -1,11 +1,14 @@
server {
listen 8003;
listen [::]:8003;
include apps/ckan;
}
listen [::]:8003 ipv6only=off;
listen [::]:8403 ssl http2 ipv6only=off;
server {
listen 8403 ssl http2;
listen [::]:8403 ssl http2;
include apps/ckan;
access_log /var/log/nginx/ckan.access.log;
error_log /var/log/nginx/ckan.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9003;
}
}

View File

@ -36,7 +36,6 @@ rc-update add crisiscleanup boot
service crisiscleanup start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/crisiscleanup /etc/nginx/apps/crisiscleanup
cp ${SOURCE_DIR}/etc/nginx/conf.d/crisiscleanup.conf /etc/nginx/conf.d/crisiscleanup.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/crisiscleanup.access.log;
error_log /var/log/nginx/crisiscleanup.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9005;
}

View File

@ -1,11 +1,14 @@
server {
listen 8005;
listen [::]:8005;
include apps/crisiscleanup;
}
listen [::]:8005 ipv6only=off;
listen [::]:8405 ssl http2 ipv6only=off;
access_log /var/log/nginx/crisiscleanup.access.log;
error_log /var/log/nginx/crisiscleanup.error.log;
server {
listen 8405 ssl http2;
listen [::]:8405 ssl http2;
include apps/crisiscleanup;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9005;
}
}

1
cts.sh
View File

@ -40,7 +40,6 @@ rc-update add cts boot
service cts start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/cts /etc/nginx/apps/cts
cp ${SOURCE_DIR}/etc/nginx/conf.d/cts.conf /etc/nginx/conf.d/cts.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/cts.access.log;
error_log /var/log/nginx/cts.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9006;
}

View File

@ -1,11 +1,14 @@
server {
listen 8006;
listen [::]:8006;
include apps/cts;
}
listen [::]:8006 ipv6only=off;
listen [::]:8406 ssl http2 ipv6only=off;
server {
listen 8406 ssl http2;
listen [::]:8406 ssl http2;
include apps/cts;
access_log /var/log/nginx/cts.access.log;
error_log /var/log/nginx/cts.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9006;
}
}

View File

@ -30,7 +30,6 @@ rc-update add gnuhealth boot
service gnuhealth start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/gnuhealth /etc/nginx/apps/gnuhealth
cp ${SOURCE_DIR}/etc/nginx/conf.d/gnuhealth.conf /etc/nginx/conf.d/gnuhealth.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/gnuhealth.access.log;
error_log /var/log/nginx/gnuhealth.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9008;
}

View File

@ -1,11 +1,14 @@
server {
listen 8008;
listen [::]:8008;
include apps/gnuhealth;
}
listen [::]:8008 ipv6only=off;
listen [::]:8408 ssl http2 ipv6only=off;
server {
listen 8408 ssl http2;
listen [::]:8408 ssl http2;
include apps/gnuhealth;
access_log /var/log/nginx/gnuhealth.access.log;
error_log /var/log/nginx/gnuhealth.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9008;
}
}

View File

@ -26,7 +26,6 @@ rc-update add kanboard boot
service kanboard start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/kanboard /etc/nginx/apps/kanboard
cp ${SOURCE_DIR}/etc/nginx/conf.d/kanboard.conf /etc/nginx/conf.d/kanboard.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/kanboard.access.log;
error_log /var/log/nginx/kanboard.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9009;
}

View File

@ -1,11 +1,14 @@
server {
listen 8009;
listen [::]:8009;
include apps/kanboard;
}
listen [::]:8009 ipv6only=off;
listen [::]:8409 ssl http2 ipv6only=off;
server {
listen 8409 ssl http2;
listen [::]:8409 ssl http2;
include apps/kanboard;
access_log /var/log/nginx/kanboard.access.log;
error_log /var/log/nginx/kanboard.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9009;
}
}

View File

@ -19,7 +19,6 @@ rc-update add openmapkit boot
service openmapkit start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/openmapkit /etc/nginx/apps/openmapkit
cp ${SOURCE_DIR}/etc/nginx/conf.d/openmapkit.conf /etc/nginx/conf.d/openmapkit.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/openmapkit.access.log;
error_log /var/log/nginx/openmapkit.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9007;
}

View File

@ -1,11 +1,14 @@
server {
listen 8007;
listen [::]:8007;
include apps/openmapkit;
}
listen [::]:8007 ipv6only=off;
listen [::]:8407 ssl http2 ipv6only=off;
server {
listen 8407 ssl http2;
listen [::]:8407 ssl http2;
include apps/openmapkit;
access_log /var/log/nginx/openmapkit.access.log;
error_log /var/log/nginx/openmapkit.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9007;
}
}

View File

@ -30,7 +30,6 @@ rc-update add seeddms boot
service seeddms start
# Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/seeddms /etc/nginx/apps/seeddms
cp ${SOURCE_DIR}/etc/nginx/conf.d/seeddms.conf /etc/nginx/conf.d/seeddms.conf
service nginx reload

View File

@ -1,9 +0,0 @@
access_log /var/log/nginx/seeddms.access.log;
error_log /var/log/nginx/seeddms.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9010;
}

View File

@ -1,11 +1,14 @@
server {
listen 8010;
listen [::]:8010;
include apps/seeddms;
}
listen [::]:8010 ipv6only=off;
listen [::]:8410 ssl http2 ipv6only=off;
server {
listen 8410 ssl http2;
listen [::]:8410 ssl http2;
include apps/seeddms;
access_log /var/log/nginx/seeddms.access.log;
error_log /var/log/nginx/seeddms.error.log;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9010;
}
}