Просмотр исходного кода

Fix SSL certificate renewal for the custom-proxy-server case

When using matrix-nginx-proxy, the file permissions are organized
in a way that matrix-nginx-proxy could read the challenge files
produced by acmetool.

However, when another own/external webserver was used (like nginx
with our generated sample configuration), this could not work.
From on we're proxying the HTTP requests to port :402 in such a case,
which fixes the problem.
pull/6/head
Slavi Pantaleev 8 лет назад
Родитель
Сommit
d14ef08d5b
2 измененных файлов: 20 добавлений и 0 удалений
  1. +10
    -0
      roles/matrix-server/templates/nginx-conf.d/matrix-riot-web.conf.j2
  2. +10
    -0
      roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2

+ 10
- 0
roles/matrix-server/templates/nginx-conf.d/matrix-riot-web.conf.j2 Просмотреть файл

@@ -5,8 +5,18 @@ server {
server_tokens off;

location /.well-known/acme-challenge {
{#
The proxy can access the files directly.
An external server likely does not have permission to read these files,
so we'll just proxy to acme's :402 port.
#}

{%- if matrix_nginx_proxy_enabled -%}
default_type "text/plain";
alias {{ matrix_ssl_certs_path }}/run/acme-challenge;
{%- else -%}
proxy_pass http://localhost:402;
{% endif %}
}

location / {


+ 10
- 0
roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2 Просмотреть файл

@@ -5,8 +5,18 @@ server {
server_tokens off;

location /.well-known/acme-challenge {
{#
The proxy can access the files directly.
An external server likely does not have permission to read these files,
so we'll just proxy to acme's :402 port.
#}

{%- if matrix_nginx_proxy_enabled -%}
default_type "text/plain";
alias {{ matrix_ssl_certs_path }}/run/acme-challenge;
{%- else -%}
proxy_pass http://localhost:402;
{% endif %}
}

location / {


Загрузка…
Отмена
Сохранить