Refactor nginx configuration
This commit is contained in:
parent
37396a628c
commit
c12fdc15de
|
@ -23,9 +23,6 @@
|
||||||
}
|
}
|
||||||
add_header Strict-Transport-Security $hsts_header;
|
add_header Strict-Transport-Security $hsts_header;
|
||||||
|
|
||||||
# Enable CSP for your services.
|
|
||||||
#add_header Content-Security-Policy "script-src 'self'; object-src 'none'; base-uri 'none';" always;
|
|
||||||
|
|
||||||
# Minimize information leaked to other domains
|
# Minimize information leaked to other domains
|
||||||
add_header 'Referrer-Policy' 'origin-when-cross-origin';
|
add_header 'Referrer-Policy' 'origin-when-cross-origin';
|
||||||
|
|
||||||
|
@ -46,18 +43,13 @@
|
||||||
"coolneng.duckdns.org" = {
|
"coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/radicale/" = {
|
# Redirect from legacy subdirectory URL to subdomain
|
||||||
return = "301 https://radicale.coolneng.duckdns.org";
|
locations = {
|
||||||
};
|
"/radicale/".return = "301 https://radicale.coolneng.duckdns.org";
|
||||||
locations."/syncthing/" = {
|
"/syncthing/".return = "301 https://sync.coolneng.duckdns.org";
|
||||||
return = "301 https://sync.coolneng.duckdns.org";
|
"/gitea/".extraConfig =
|
||||||
};
|
|
||||||
locations."/gitea/" = {
|
|
||||||
extraConfig =
|
|
||||||
"rewrite ^/gitea/(.*)$ https://git.coolneng.duckdns.org/$1 last;";
|
"rewrite ^/gitea/(.*)$ https://git.coolneng.duckdns.org/$1 last;";
|
||||||
};
|
"/miniflux/".extraConfig =
|
||||||
locations."/miniflux/" = {
|
|
||||||
extraConfig =
|
|
||||||
"rewrite ^/miniflux/(.*)$ https://rss.coolneng.duckdns.org/$1 last;";
|
"rewrite ^/miniflux/(.*)$ https://rss.coolneng.duckdns.org/$1 last;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -75,17 +67,17 @@
|
||||||
"sync.coolneng.duckdns.org" = {
|
"sync.coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = { proxyPass = "http://localhost:8384/"; };
|
locations."/".proxyPass = "http://localhost:8384/";
|
||||||
};
|
};
|
||||||
"git.coolneng.duckdns.org" = {
|
"git.coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = { proxyPass = "http://localhost:3000/"; };
|
locations."/".proxyPass = "http://localhost:3000/";
|
||||||
};
|
};
|
||||||
"rss.coolneng.duckdns.org" = {
|
"rss.coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = { proxyPass = "http://localhost:8080/"; };
|
locations."/".proxyPass = "http://localhost:8080/";
|
||||||
};
|
};
|
||||||
"matrix.coolneng.duckdns.org" = {
|
"matrix.coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
@ -107,8 +99,7 @@
|
||||||
"element.coolneng.duckdns.org" = {
|
"element.coolneng.duckdns.org" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/".root = pkgs.element-web.override {
|
||||||
root = pkgs.element-web.override {
|
|
||||||
conf = {
|
conf = {
|
||||||
default_server_config."m.homeserver" = {
|
default_server_config."m.homeserver" = {
|
||||||
"base_url" = "https://matrix.coolneng.duckdns.org";
|
"base_url" = "https://matrix.coolneng.duckdns.org";
|
||||||
|
@ -117,7 +108,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
"wallabag.coolneng.duckdns.org" = {
|
"wallabag.coolneng.duckdns.org" = {
|
||||||
root = "${pkgs.wallabag}/web";
|
root = "${pkgs.wallabag}/web";
|
||||||
locations."/" = { tryFiles = "$uri /app.php$is_args$args"; };
|
locations."/" = { tryFiles = "$uri /app.php$is_args$args"; };
|
||||||
|
|
Loading…
Reference in New Issue