Add tome.oliverdavies.uk virtual host
This commit is contained in:
parent
00e8cc2170
commit
4338b28c1c
2 changed files with 39 additions and 9 deletions
|
@ -31,6 +31,7 @@
|
||||||
"rebuilding-symfony.oliverdavies.uk"
|
"rebuilding-symfony.oliverdavies.uk"
|
||||||
"tailwindcss-demo.oliverdavies.uk"
|
"tailwindcss-demo.oliverdavies.uk"
|
||||||
"talking-drupal-tailwindcss.oliverdavies.uk"
|
"talking-drupal-tailwindcss.oliverdavies.uk"
|
||||||
|
"tome.oliverdavies.uk"
|
||||||
"uptime.oliverdavies.uk"
|
"uptime.oliverdavies.uk"
|
||||||
"wp-tailwind.oliverdavies.uk"
|
"wp-tailwind.oliverdavies.uk"
|
||||||
"www.oliverdavies.uk"
|
"www.oliverdavies.uk"
|
||||||
|
|
|
@ -7,23 +7,29 @@ let
|
||||||
map (r: "rewrite ^${r.from}/?$ ${r.to} redirect;") redirects
|
map (r: "rewrite ^${r.from}/?$ ${r.to} redirect;") redirects
|
||||||
);
|
);
|
||||||
|
|
||||||
tomePaths = [
|
tome = {
|
||||||
"core"
|
root = "/var/www/vhosts/website-tome";
|
||||||
"examples"
|
|
||||||
"sites/default/files"
|
paths = [
|
||||||
"themes/custom/opdavies"
|
"core"
|
||||||
"tome-test"
|
"examples"
|
||||||
];
|
"sites/default/files"
|
||||||
|
"themes/custom/opdavies"
|
||||||
|
"tome-test"
|
||||||
|
];
|
||||||
|
|
||||||
|
port = 8098;
|
||||||
|
};
|
||||||
|
|
||||||
tomeLocations = builtins.listToAttrs (
|
tomeLocations = builtins.listToAttrs (
|
||||||
map (path: {
|
map (path: {
|
||||||
name = "/${path}";
|
name = "/${path}";
|
||||||
|
|
||||||
value = {
|
value = {
|
||||||
root = "/var/www/vhosts/website-tome";
|
root = tome.root;
|
||||||
tryFiles = "$uri $uri.html $uri/index.html =404";
|
tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||||
};
|
};
|
||||||
}) tomePaths
|
}) tome.paths
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -65,11 +71,34 @@ in
|
||||||
globalRedirect = "www.oliverdavies.uk";
|
globalRedirect = "www.oliverdavies.uk";
|
||||||
useACMEHost = "oliverdavies.uk";
|
useACMEHost = "oliverdavies.uk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"tome.oliverdavies.uk" = {
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "localhost";
|
||||||
|
port = tome.port;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
locations."/".tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||||
|
|
||||||
|
root = tome.root;
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
add_header X-Robots-Tag "noindex, nofollow";
|
||||||
|
|
||||||
|
port_in_redirect off;
|
||||||
|
|
||||||
|
# Remove trailing slashes.
|
||||||
|
rewrite ^/(.*)/$ /$1 permanent;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cloudflared.tunnels."e1514105-327f-4984-974e-e2fbaca76466" = {
|
cloudflared.tunnels."e1514105-327f-4984-974e-e2fbaca76466" = {
|
||||||
ingress = {
|
ingress = {
|
||||||
"oliverdavies.uk" = "http://localhost:${toString port}";
|
"oliverdavies.uk" = "http://localhost:${toString port}";
|
||||||
|
"tome.oliverdavies.uk" = "http://localhost:${toString tome.port}";
|
||||||
"www.oliverdavies.uk" = "http://localhost:${toString port}";
|
"www.oliverdavies.uk" = "http://localhost:${toString port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue