mirror of https://git.envs.net/envs/ops.git
nginx: use redirect instead of proxy_pass for location ~ ^/_matrix(/media|/maubot)
Signed-off-by: creme <creme@envs.net>
This commit is contained in:
parent
af4db231ac
commit
48a0c5f1f7
|
@ -42,8 +42,6 @@ server {
|
|||
root /var/www/envs.net/;
|
||||
index index.php index.html;
|
||||
|
||||
#rewrite ^([^.]*[^/])$ $1/ permanent;
|
||||
|
||||
location / {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
try_files $uri.html $uri $uri/ @extensionless-php;
|
||||
|
@ -86,23 +84,9 @@ server {
|
|||
}
|
||||
|
||||
location ~ ^/_matrix(/media|/maubot) {
|
||||
include proxy_params;
|
||||
proxy_ssl_name $http_host;
|
||||
proxy_ssl_server_name on;
|
||||
|
||||
proxy_pass https://matrix.envs.net;
|
||||
return 302 https://matrix.envs.net$request_uri;
|
||||
}
|
||||
|
||||
location ^~ /_matrix/maubot/v1/logs {
|
||||
include proxy_params;
|
||||
proxy_ssl_name $http_host;
|
||||
proxy_ssl_server_name on;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_pass https://matrix.envs.net;
|
||||
}
|
||||
|
||||
## users
|
||||
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
|
||||
|
@ -134,6 +118,7 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
location ~* /\.(eot|ttf|woff|woff2)$ {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
expires 365d;
|
||||
|
@ -152,7 +137,8 @@ server {
|
|||
deny all;
|
||||
}
|
||||
|
||||
# aliases
|
||||
|
||||
## aliases
|
||||
location /coc {
|
||||
return 301 https://envs.net/code-of-conduct;
|
||||
}
|
||||
|
@ -180,7 +166,8 @@ server {
|
|||
return 301 https://matrix-help.envs.net/;
|
||||
}
|
||||
|
||||
# include php and ssi
|
||||
|
||||
## include php and ssi
|
||||
include snippets/php.conf;
|
||||
ssi on;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue