Properly proxy .well-known to the atproto PDS
This commit is contained in:
@@ -22,8 +22,6 @@
|
|||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
# Core Web Directory
|
# Core Web Directory
|
||||||
"d /var/www/tty.garden - root nginx -"
|
"d /var/www/tty.garden - root nginx -"
|
||||||
# Well-known storage
|
|
||||||
"d /var/www/well-known - root nginx -"
|
|
||||||
# Mirrors
|
# Mirrors
|
||||||
"d /var/www/mirror - root nginx -"
|
"d /var/www/mirror - root nginx -"
|
||||||
"d /var/www/mirror/maple - ahill nginx -"
|
"d /var/www/mirror/maple - ahill nginx -"
|
||||||
@@ -34,6 +32,15 @@
|
|||||||
addSSL = true;
|
addSSL = true;
|
||||||
useACMEHost = "tty.garden";
|
useACMEHost = "tty.garden";
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
|
};
|
||||||
|
pdsProxy = {
|
||||||
|
# Used for handle verification
|
||||||
|
proxyPass = "http://127.0.0.1:3001";
|
||||||
|
extraConfig =
|
||||||
|
''
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
'';
|
||||||
}; in {
|
}; in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@@ -41,12 +48,7 @@
|
|||||||
"tty.garden" = vhostDefault // {
|
"tty.garden" = vhostDefault // {
|
||||||
root = "/var/www/tty.garden";
|
root = "/var/www/tty.garden";
|
||||||
|
|
||||||
# TODO: User public_html folders
|
locations."^~ /.well-known/" = pdsProxy;
|
||||||
# Use disable symlinks with `if_not_owner` and from=$HOME for user
|
|
||||||
|
|
||||||
locations."^~ /.well-known/" = {
|
|
||||||
alias = "/var/www/well-known/";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
"seed.tty.garden" = vhostDefault // {
|
"seed.tty.garden" = vhostDefault // {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
@@ -68,6 +70,9 @@
|
|||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"*.tty.garden" = vhostDefault // {
|
||||||
|
locations."~/.well-known/" = pdsProxy;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user