Last active
July 20, 2021 17:58
-
-
Save kalbasit/9cf9b23f2e0f70c285d0 to your computer and use it in GitHub Desktop.
DSM Allow custom domain for Photo Station
This file contains hidden or 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
diff --git a/usr/syno/share/nginx/Photo.mustache b/usr/syno/share/nginx/Photo.mustache | |
new file mode 100644 | |
index 0000000..54043ff | |
--- /dev/null | |
+++ b/usr/syno/share/nginx/Photo.mustache | |
@@ -0,0 +1,19 @@ | |
+server { | |
+ listen 80; | |
+ listen [::]:80; | |
+ listen 443 ssl; | |
+ listen [::]:443 ssl; | |
+ | |
+ server_name photos.example.com; | |
+ | |
+ location = / { | |
+ {{#DSM.ssl}} | |
+ if ($scheme = https) { | |
+ rewrite / https://$host/photo/ redirect; | |
+ } | |
+ {{/DSM.ssl}} | |
+ rewrite / http://$host/photo/ redirect; | |
+ } | |
+ | |
+ include /usr/local/etc/nginx/conf.d/www.PhotoStation.conf; | |
+} | |
diff --git a/usr/syno/share/nginx/nginx.mustache b/usr/syno/share/nginx/nginx.mustache | |
index e10aec4..d42b1de 100644 | |
--- a/usr/syno/share/nginx/nginx.mustache | |
+++ b/usr/syno/share/nginx/nginx.mustache | |
@@ -56,6 +56,7 @@ http { | |
index index.html index.htm index.php; | |
+ {{> /usr/syno/share/nginx/Photo}} | |
{{> /usr/syno/share/nginx/DSM}} | |
{{> /usr/syno/share/nginx/WWWService}} | |
{{> /usr/syno/share/nginx/Portal}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More context is this original forum post