move syncthing to sub path instead of domain
parent
09ceac4706
commit
929d6796b0
|
@ -10,7 +10,7 @@ docker run \
|
||||||
--env PGID=1000 \
|
--env PGID=1000 \
|
||||||
--env EMAIL=sysadmin@seaturtle.pw \
|
--env EMAIL=sysadmin@seaturtle.pw \
|
||||||
--env URL=seaturtle.pw \
|
--env URL=seaturtle.pw \
|
||||||
--env SUBDOMAINS=airsonic,plex,syncthing,www \
|
--env SUBDOMAINS=airsonic,plex,www \
|
||||||
--env VALIDATION=html \
|
--env VALIDATION=html \
|
||||||
--env TZ=US/Eastern \
|
--env TZ=US/Eastern \
|
||||||
--volume $PWD/config:/config:rw \
|
--volume $PWD/config:/config:rw \
|
||||||
|
|
|
@ -32,27 +32,27 @@ server {
|
||||||
proxy_pass https://paulwalko.github.io;
|
proxy_pass https://paulwalko.github.io;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Proxy misc files
|
# Proxy syncthing
|
||||||
|
location /syncthing/ {
|
||||||
|
auth_basic "not today buddy";
|
||||||
|
auth_basic_user_file /config/nginx/syncthing-htpasswd;
|
||||||
|
proxy_set_header X-Real_IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-proto $scheme;
|
||||||
|
proxy_pass http://syncthing:8384/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Serve misc files
|
||||||
location /files {
|
location /files {
|
||||||
alias /files-docker;
|
alias /files-docker;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Server syncthing files
|
# Serve syncthing files
|
||||||
location /sync {
|
location /sync {
|
||||||
auth_basic "nope definitely not today buddy";
|
auth_basic "nope definitely not today buddy";
|
||||||
auth_basic_user_file /config/nginx/sync-htpasswd;
|
auth_basic_user_file /config/nginx/sync-htpasswd;
|
||||||
alias /sync-docker;
|
alias /sync-docker;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Weechat relay
|
|
||||||
location /weechat {
|
|
||||||
proxy_pass http://172.17.0.1:9001/weechat;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_read_timeout 604800;
|
|
||||||
proxy_set_header X-RealIP $remote_addr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
server_name syncthing.seaturtle.pw;
|
|
||||||
|
|
||||||
return 301 https://syncthing.seaturtle.pw$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
listen [::]:443 ssl;
|
|
||||||
server_name syncthing.seaturtle.pw;
|
|
||||||
|
|
||||||
# ssl conf
|
|
||||||
include /config/nginx/ssl.conf;
|
|
||||||
|
|
||||||
# Proxy syncthing
|
|
||||||
location / {
|
|
||||||
auth_basic "not today buddy";
|
|
||||||
auth_basic_user_file /config/nginx/syncthing-htpasswd;
|
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://syncthing:8384;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Assumes pew-net exists
|
# Assumes pew-net exists
|
||||||
# Make config dir (as non-root) before launching
|
# Create mounted dirs (as non-root) before launching
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
--name syncthing \
|
--name syncthing \
|
||||||
|
|
Loading…
Reference in New Issue