openresty-config/http.d/matrix.conf
2025-03-31 15:54:12 -03:00

122 lines
3.4 KiB
Text

# server {
# server_name matrix.zzls.xyz;
# include configs/listen.conf;
# include configs/general.conf;
# include configs/robotsNone.conf;
# include configs/security.conf;
#
# location /.well-known/matrix/server {
# return 200 '{ "m.server": "matrix.zzls.xyz:8448" }';
# }
#
# location /.well-known/matrix/client {
# default_type application/json;
# add_header Access-Control-Allow-Origin '*';
# return 200 '{ "m.homeserver": { "base_url": "https://matrix.zzls.xyz" }, "org.matrix.msc3575.proxy": {"url": "https://matrix.zzls.xyz"}}';
# }
#
# #location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
# # proxy_pass http://127.0.0.1:40022;
# # proxy_set_header X-Forwarded-For $remote_addr;
# # proxy_set_header X-Forwarded-Proto $scheme;
# # proxy_set_header Host $host;
# #}
#
# location ~ ^(/_matrix|/_synapse/client|/health|/_synapse/metrics) {
# proxy_pass http://matrix;
# include configs/proxy.conf;
# client_max_body_size 64M;
# }
#
# # QUIC
# include configs/http3.conf;
#
#
# listen 8448 ssl;
# listen 8448 quic;
#
# }
#
server {
access_log /var/log/nginx/matrix.nadeko.net.access.log;
server_name matrix.nadeko.net;
include configs/listen.conf;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location /.well-known/matrix/support {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
return 200 '{"contacts": [{"matrix_id": "@fijxu:nadeko.net","email_address": "admin@nadeko.net","role": "m.role.admin"},{"email_address": "admin@nadeko.net","role": "m.role.security"}],"support_page": "https://nadeko.net/contact" }';
}
location /.well-known/matrix/server {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.server": "matrix.nadeko.net:443" }';
}
location /.well-known/matrix/client {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
return 200 '{ "m.homeserver": { "base_url": "https://matrix.nadeko.net" }}';
}
location ~ ^(/_matrix|/_synapse/client|/health|/_synapse/metrics|/_synapse/admin) {
proxy_pass http://127.0.0.1:10022;
include configs/proxy.conf;
client_max_body_size 64M;
}
# location ~ ^(/_matrix/client|/matrix/federation|/_matrix/key/v2/query|/_synapse/client) {
# proxy_pass http://127.0.0.1:10022;
# include configs/proxy.conf;
# client_max_body_size 64M;
# }
#
# location ~ ^(/_matrix/media|/_matrix/client/v1/media|/_matrix/federation/v1/media) {
# proxy_pass http://127.0.0.1:10023;
# include configs/proxy.conf;
# client_max_body_size 64M;
# }
location / {
proxy_pass http://127.0.0.1:10024;
include configs/proxy.conf;
client_max_body_size 64M;
}
#listen 443 ssl reuseport;
#listen 8448 ssl default_server reuseport;
# Port that is only accessed via netmaker, used to proxy the traffic to another
# server
}
server {
server_name synapse-admin.nadeko.net;
include configs/listen.conf;
include configs/general.conf;
include configs/security.conf;
location / {
proxy_pass http://127.0.0.1:10025;
include configs/proxy.conf;
}
}
# server {
# server_name matrix-auth.nadeko.net;
# include configs/listen.conf;
# include configs/general.conf;
# include configs/security.conf;
#
# location / {
# proxy_pass http://127.0.0.1:10026;
# include configs/proxy.conf;
# }
#
#
#
# }