2022-05-11 09:20:52 +08:00
|
|
|
#=======================================================================#
|
|
|
|
|
# Default Web Domain Template #
|
|
|
|
|
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
|
|
|
|
#=======================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
listen %ip%:%proxy_ssl_port% ssl http2;
|
|
|
|
|
listen 8448 ssl default_server;
|
|
|
|
|
server_name %domain_idn% %alias_idn%;
|
|
|
|
|
ssl_certificate %ssl_pem%;
|
|
|
|
|
ssl_certificate_key %ssl_key%;
|
|
|
|
|
ssl_stapling on;
|
|
|
|
|
ssl_stapling_verify on;
|
|
|
|
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
|
|
|
|
|
|
|
|
|
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
|
|
|
|
|
|
|
|
|
root %sdocroot%;
|
|
|
|
|
# Enable gzip but do not remove ETag headers
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_vary on;
|
|
|
|
|
gzip_comp_level 4;
|
|
|
|
|
gzip_min_length 256;
|
|
|
|
|
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
|
|
|
|
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
2023-02-06 17:24:35 +08:00
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
proxy_pass http://127.0.0.1:6080;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
# Nginx by default only allows file uploads up to 1M in size
|
|
|
|
|
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-11 09:20:52 +08:00
|
|
|
location /.well-known/matrix/client {
|
|
|
|
|
return 200 '{"m.homeserver": {"base_url": "https://im.kernel.ws"}}';
|
|
|
|
|
default_type application/json;
|
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
|
|
|
}
|
|
|
|
|
location ~* ^(\/_matrix|\/_synapse) {
|
2023-01-27 23:36:26 +08:00
|
|
|
proxy_pass http://127.0.0.1:8008;
|
2022-05-11 09:20:52 +08:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
# Nginx by default only allows file uploads up to 1M in size
|
|
|
|
|
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
|
|
|
|
}
|
|
|
|
|
location /admin/ {
|
2023-01-27 23:36:26 +08:00
|
|
|
proxy_pass http://127.0.0.1:8100/;
|
2022-05-11 09:20:52 +08:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
|
|
|
|
}
|
|
|
|
|
|