diff --git a/check_process b/check_process index 426bad7..ed92383 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) - path="/_matrix/client/versions" (PATH) + path="/path" (PATH) is_public=1 (PUBLIC|public=1|private=0) port="666" (PORT) ; Checks diff --git a/conf/nginx.conf b/conf/nginx.conf index ba105da..d192170 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,21 @@ -location __PATH__ { - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Forwarded-For $remote_addr; - - client_max_body_size 100M; +rewrite ^$ /; +location ~ ^/$ { + default_type text/plain; + return 200 "This is where Dendrite is installed."; +} + +location /.well-known/matrix/server { + return 200 '{ "m.server": "__DOMAIN__:443" }'; +} + +location /.well-known/matrix/client { + return 200 '{ "m.homeserver": { "base_url": "https://__DOMAIN__" } }'; +} + +location /_matrix { + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_read_timeout 600; + client_max_body_size 100M; } diff --git a/manifest.json b/manifest.json index b3eb16f..3f92d3b 100644 --- a/manifest.json +++ b/manifest.json @@ -33,7 +33,7 @@ }, "help": { "en": "Dendrite requires its own domain, so make sure to create a new one.", - "fr": "Dendrite a besoin de son propre domain, créez-en un au préalable." + "fr": "Dendrite a besoin de son propre domaine, créez-en un au préalable." }, "example": "dendrite.example.com" }, diff --git a/scripts/install b/scripts/install index d0436ac..09a2f4b 100755 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url="/_matrix" +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME