-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration for sober.page servers
- Loading branch information
1 parent
d7fe4c2
commit 7f22630
Showing
7 changed files
with
89 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ base: | |
|
||
'irc*': | ||
- webapps | ||
|
||
'*.sobersupport.group': | ||
- webapps |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{% if salt.match.glob('irc.lustfield.net') %} | ||
webapps: | ||
{% if salt.match.glob('irc.lustfield.net') %} | ||
mtpaste: paste.lustfield.net | ||
ipecho: ip.lustfield.net | ||
|
||
{% endif %} | ||
{% elif salt.match.glob('*.sobersupport.group') %} | ||
soberpage: None # monolithic | ||
{% endif %} |
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,51 @@ | ||
## | ||
# Canonical Domain: sobersupport.group | ||
# Note: Only external redirects should be hanlded by this server block. | ||
## | ||
map $host $canonical_redirect { | ||
default "https;//about.sobersupport.group/oops.html"; | ||
include canonical_redirects.map; | ||
} | ||
server { | ||
# Socket Settings | ||
listen 80; | ||
listen [::]:80; | ||
#listen 443 ssl; | ||
#listen [::]:443 ssl; | ||
#ssl_certificate /etc/letsencrypt/live/sobersupport.group/fullchain.pem; | ||
#ssl_certificate_key /etc/letsencrypt/live/sobersupport.group/privkey.pem; | ||
|
||
# Common Headers | ||
#add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; | ||
add_header X-Frame-Options DENY; | ||
add_header X-Content-Type-Options nosniff; | ||
add_header Vary "Accept-Encoding"; | ||
|
||
# Forward to external domain | ||
server_name *.sobersupport.group; | ||
return 302 $canonical_redirect; | ||
} | ||
|
||
## | ||
# Alias: sober.page | ||
# Note: Nearly all requests to this domain will use this server block. | ||
## | ||
server { | ||
# Socket Settings | ||
listen 80; | ||
listen [::]:80; | ||
#listen 443 ssl; | ||
#listen [::]:443 ssl; | ||
#ssl_certificate /etc/letsencrypt/live/sober.page/fullchain.pem; | ||
#ssl_certificate_key /etc/letsencrypt/live/sober.page/privkey.pem; | ||
|
||
# Common Headers | ||
#add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; | ||
add_header X-Frame-Options DENY; | ||
add_header X-Content-Type-Options nosniff; | ||
add_header Vary "Accept-Encoding"; | ||
|
||
# Forward <fwd>.sober.page/<path> to <fwd>.sobersupport.group/<path> | ||
server_name ~^(?<fwd>.+)\.sober\.page$; | ||
return 301 $scheme://$fwd.sobersupport.group$request_uri; | ||
} |
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,21 @@ | ||
include: | ||
- nginx | ||
|
||
soberpage: | ||
git.latest: | ||
- name: https://danwin1210.de:1443/recoverysource/sober.page | ||
- target: /srv/soberpage | ||
- force_checkout: True | ||
file.managed: | ||
- name: /etc/nginx/conf.d/soberpage.conf | ||
- source: salt://webapps/nginx-cfg/soberpage.conf | ||
- require: | ||
- pkg: nginx | ||
- watch_in: | ||
- service: nginx | ||
cmd.run: | ||
- name: /srv/soberpage/sync.py -n | ||
- watch: | ||
- git: soberpage | ||
- watch_in: | ||
- service: nginx |
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