From 99e4fcb21b5a4642829ffccb002f92c8667ddff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 23 Feb 2024 18:22:40 +0100 Subject: [PATCH] Use domain for mail stack and hard code main path as it static --- conf/homeserver.yaml | 2 +- conf/nginx.conf | 4 ++-- scripts/_common.sh | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/conf/homeserver.yaml b/conf/homeserver.yaml index 37055cb..7720a95 100644 --- a/conf/homeserver.yaml +++ b/conf/homeserver.yaml @@ -2260,7 +2260,7 @@ password_providers: email: # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'. # - smtp_host: "__MAIN_DOMAIN__" + smtp_host: "__DOMAIN__" # The port on the mail server for outgoing SMTP. Defaults to 25. # diff --git a/conf/nginx.conf b/conf/nginx.conf index c885c94..76a811b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -location __BASE_API_URL__/ { +location /_matrix/ { proxy_pass http://localhost:__PORT_SYNAPSE__; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; @@ -8,7 +8,7 @@ location __BASE_API_URL__/ { } # Use the specific path for the php file. It's more secure than global php path -location __BASE_API_URL__/cas_server.php { +location /_matrix/cas_server.php/ { alias /var/www/__APP__/; fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/run/php/php__PHPVERSION__-fpm-__NAME__.sock; diff --git a/scripts/_common.sh b/scripts/_common.sh index 49d186b..bf667da 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,8 +1,5 @@ - python_version="$(python3 -V | cut -d' ' -f2 | cut -d. -f1-2)" -main_domain=$(yunohost domain main-domain --output-as plain) code_dir="/opt/yunohost/matrix-$app" -base_api_url="/_matrix" install_sources() { # Install/upgrade synapse in virtualenv