forked from kartoza/osgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP for simple uploader and Mosquitto TLS suppor
- Loading branch information
Showing
10 changed files
with
202 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# This script will require that mosquitto be restarted whenever the cert changes | ||
mkdir /etc/mosquitto | ||
# When mosquitto runs it drops down to the mostquitto user | ||
# and that user needs to be able to access the certs | ||
# We work on a copy so that we dont end up chaning the permissions globally | ||
cp /etc/letsencrypt/archive/{{siteDomain}}/chain1.pem /etc/mosquitto/chain.pem | ||
cp /etc/letsencrypt/archive/{{siteDomain}}/cert1.pem /etc/mosquitto/cert.pem | ||
cp /etc/letsencrypt/archive/{{siteDomain}}/privkey1.pem /etc/mosquitto/privkey.pem | ||
chown mosquitto.mosquitto /etc/mosquitto/*.pem | ||
mosquitto -c /mosquitto/config/mosquitto.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
location /upload { | ||
proxy_pass http://simple-file-upload:3000/upload; | ||
|
||
#Defines the HTTP protocol version for proxying | ||
#by default it it set to 1.0. | ||
#For Websockets and keepalive connections you need to use the version 1.1 | ||
proxy_http_version 1.1; | ||
|
||
#Sets conditions under which the response will not be taken from a cache. | ||
proxy_cache_bypass $http_upgrade; | ||
|
||
#These header fields are required if your application is using Websockets | ||
proxy_set_header Upgrade $http_upgrade; | ||
|
||
#These header fields are required if your application is using Websockets | ||
proxy_set_header Connection "upgrade"; | ||
|
||
#The $host variable in the following order of precedence contains: | ||
#hostname from the request line, or hostname from the Host request header field | ||
#or the server name matching a request. | ||
proxy_set_header Host $host; | ||
|
||
#Forwards the real visitor remote IP address to the proxied server | ||
proxy_set_header X-Real-IP $remote_addr; | ||
|
||
#A list containing the IP addresses of every server the client has been proxied through | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
#When used inside an HTTPS server block, each HTTP response from the proxied server is rewritten to HTTPS. | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
#Defines the original host requested by the client. | ||
proxy_set_header X-Forwarded-Host $host; | ||
|
||
#Defines the original port requested by the client. | ||
proxy_set_header X-Forwarded-Port $server_port; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
location /survey/ { | ||
proxy_pass http://surveysolutions/; | ||
|
||
#Defines the HTTP protocol version for proxying | ||
#by default it it set to 1.0. | ||
#For Websockets and keepalive connections you need to use the version 1.1 | ||
proxy_http_version 1.1; | ||
|
||
#Sets conditions under which the response will not be taken from a cache. | ||
proxy_cache_bypass $http_upgrade; | ||
|
||
#These header fields are required if your application is using Websockets | ||
proxy_set_header Upgrade $http_upgrade; | ||
|
||
#These header fields are required if your application is using Websockets | ||
proxy_set_header Connection "upgrade"; | ||
|
||
#The $host variable in the following order of precedence contains: | ||
#hostname from the request line, or hostname from the Host request header field | ||
#or the server name matching a request. | ||
proxy_set_header Host $host; | ||
|
||
#Forwards the real visitor remote IP address to the proxied server | ||
proxy_set_header X-Real-IP $remote_addr; | ||
|
||
#A list containing the IP addresses of every server the client has been proxied through | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
#When used inside an HTTPS server block, each HTTP response from the proxied server is rewritten to HTTPS. | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
#Defines the original host requested by the client. | ||
proxy_set_header X-Forwarded-Host $host; | ||
|
||
#Defines the original port requested by the client. | ||
proxy_set_header X-Forwarded-Port $server_port; | ||
} | ||
|
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters