uninsane.org: simplify the /share routing (and generalize it to other subdirectories)
This commit is contained in:
@@ -58,7 +58,6 @@ in
|
|||||||
# sane.fs."/var/lib/uninsane/share/Ubunchu".mount.bind = "/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu";
|
# sane.fs."/var/lib/uninsane/share/Ubunchu".mount.bind = "/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu";
|
||||||
# sane.fs."/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
|
# sane.fs."/var/lib/uninsane/media/Books/Visual/HiroshiSeo/Ubunchu".dir = {};
|
||||||
services.nginx.virtualHosts."uninsane.org" = publog {
|
services.nginx.virtualHosts."uninsane.org" = publog {
|
||||||
root = "${pkgs.uninsane-dot-org}/share/uninsane-dot-org";
|
|
||||||
# a lot of places hardcode https://uninsane.org,
|
# a lot of places hardcode https://uninsane.org,
|
||||||
# and then when we mix http + non-https, we get CORS violations
|
# and then when we mix http + non-https, we get CORS violations
|
||||||
# and things don't look right. so force SSL.
|
# and things don't look right. so force SSL.
|
||||||
@@ -68,10 +67,14 @@ in
|
|||||||
# for OCSP stapling
|
# for OCSP stapling
|
||||||
sslTrustedCertificate = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
sslTrustedCertificate = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
|
||||||
# uninsane.org/share/foo => /var/lib/uninsane/share/foo.
|
locations."/" = {
|
||||||
# yes, nginx does not strip the prefix when evaluating against the root.
|
root = "${pkgs.uninsane-dot-org}/share/uninsane-dot-org";
|
||||||
locations."/share" = {
|
tryFiles = "$uri $uri/ @fallback";
|
||||||
root = "/var/lib/uninsane";
|
};
|
||||||
|
|
||||||
|
# uninsane.org/share/foo => /var/www/sites/uninsane.org/share/foo.
|
||||||
|
locations."@fallback" = {
|
||||||
|
root = "/var/www/sites/uninsane.org";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# autoindex => render directory listings
|
# autoindex => render directory listings
|
||||||
autoindex on;
|
autoindex on;
|
||||||
|
Reference in New Issue
Block a user