Sfoglia il codice sorgente

Make federation domain customizable

pull/1147/head
oxmie 4 anni fa
committed by Marvin
parent
commit
5df4d68829
4 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. +3
    -0
      roles/matrix-base/defaults/main.yml
  2. +1
    -1
      roles/matrix-base/templates/static-files/well-known/matrix-server.j2
  3. +1
    -0
      roles/matrix-nginx-proxy/defaults/main.yml
  4. +1
    -1
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2

+ 3
- 0
roles/matrix-base/defaults/main.yml Vedi File

@@ -11,6 +11,9 @@ matrix_domain: ~
# This and the Element FQN (see below) are expected to be on the same server. # This and the Element FQN (see below) are expected to be on the same server.
matrix_server_fqn_matrix: "matrix.{{ matrix_domain }}" matrix_server_fqn_matrix: "matrix.{{ matrix_domain }}"


# This is where you access federation API.
matrix_server_fqn_matrix_federation: '{{ matrix_server_fqn_matrix }}'

# This is where you access the Element web UI from (if enabled via matrix_client_element_enabled; enabled by default). # This is where you access the Element web UI from (if enabled via matrix_client_element_enabled; enabled by default).
# This and the Matrix FQN (see above) are expected to be on the same server. # This and the Matrix FQN (see above) are expected to be on the same server.
matrix_server_fqn_element: "element.{{ matrix_domain }}" matrix_server_fqn_element: "element.{{ matrix_domain }}"


+ 1
- 1
roles/matrix-base/templates/static-files/well-known/matrix-server.j2 Vedi File

@@ -1,4 +1,4 @@
#jinja2: lstrip_blocks: "True" #jinja2: lstrip_blocks: "True"
{ {
"m.server": "{{ matrix_server_fqn_matrix }}:{{ matrix_federation_public_port }}"
"m.server": "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
} }

+ 1
- 0
roles/matrix-nginx-proxy/defaults/main.yml Vedi File

@@ -120,6 +120,7 @@ matrix_nginx_proxy_proxy_hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
# Controls whether proxying the matrix domain should be done. # Controls whether proxying the matrix domain should be done.
matrix_nginx_proxy_proxy_matrix_enabled: false matrix_nginx_proxy_proxy_matrix_enabled: false
matrix_nginx_proxy_proxy_matrix_hostname: "{{ matrix_server_fqn_matrix }}" matrix_nginx_proxy_proxy_matrix_hostname: "{{ matrix_server_fqn_matrix }}"
matrix_nginx_proxy_proxy_matrix_federation_hostname: "{{ matrix_nginx_proxy_proxy_matrix_hostname }}"
# The port name used for federation in the nginx configuration. # The port name used for federation in the nginx configuration.
# This is not necessarily the port that it's actually on, # This is not necessarily the port that it's actually on,
# as port-mapping happens (`-p ..`) for the `matrix-nginx-proxy` container. # as port-mapping happens (`-p ..`) for the `matrix-nginx-proxy` container.


+ 1
- 1
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 Vedi File

@@ -239,7 +239,7 @@ server {
listen {{ matrix_nginx_proxy_proxy_matrix_federation_port }}; listen {{ matrix_nginx_proxy_proxy_matrix_federation_port }};
{% endif %} {% endif %}


server_name {{ matrix_nginx_proxy_proxy_matrix_hostname }};
server_name {{ matrix_nginx_proxy_proxy_matrix_federation_hostname }};
server_tokens off; server_tokens off;


root /dev/null; root /dev/null;


Caricamento…
Annulla
Salva