interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / infra / spark / nginx / sites-aienos.com

136 lines · 6305 bytes Raw Blame History
1# www.aienos.com edge: the hub serves the site itself (SiteHub, 2026-11-07),
2# from /var/www/aienos.com/current -> releases/<UTC>, a dist/ built on spark by
3# the site's own Omega pipeline (spark ~/work/sitehub/REFRESH.md). It also adds
4# Accept: text/markdown negotiation and a canonical Link header on every
5# Markdown mirror. Reached only through the :443 SNI router in
6# /etc/nginx/stream.d/sni-router.conf.
7
8# UNUSED since 2026-11-07 (aien-dev org flagged; Pages answers 404). To switch
9# back to GitHub Pages, restore the backup in /etc/nginx/sitehub-backups/.
10upstream aienos_github_pages {
11 server 185.199.108.153:443;
12 server 185.199.109.153:443;
13 server 185.199.110.153:443;
14 server 185.199.111.153:443;
15}
16
17# The HTML page a mirror belongs to: /index.md -> /, /blog/index.md -> /blog/,
18# /machine.md -> /machine/.
19map $uri $aienos_md_canonical {
20 default "";
21 ~^/(.*)index\.md$ /$1;
22 ~^/(.*)\.md$ /$1/;
23}
24
25# html, Markdown mirrors and data change on every build: revalidate. Assets
26# (css, js, images, audio) are not content-hashed, so they get a short TTL only.
27map $uri $aienos_cache {
28 default "public, max-age=600";
29 ~/$ "no-cache";
30 ~*\.(html|md|json|tsv|xml|txt|om)$ "no-cache";
31}
32
33map $aienos_md_canonical $aienos_md_link {
34 "" "";
35 default "<https://www.aienos.com$aienos_md_canonical>; rel=\"canonical\"";
36}
37
38server {
39 listen 127.0.0.1:4445 ssl http2; # Spark nginx 1.24: http2 per listen (Pi 1.28 uses "http2 on")
40 # PROXY-protocol listener (allen chat lane): the :443 router sends www.aienos.com here.
41 listen 127.0.0.1:4446 ssl http2 proxy_protocol; # Spark nginx 1.24: http2 per listen (Pi 1.28 uses "http2 on")
42 server_name www.aienos.com;
43
44 ssl_certificate /etc/nginx/certs/www.aienos.com/fullchain.pem;
45 ssl_certificate_key /etc/nginx/certs/www.aienos.com/key.pem;
46 ssl_protocols TLSv1.2 TLSv1.3;
47 ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
48 ssl_prefer_server_ciphers off;
49 ssl_session_tickets off;
50
51 proxy_ssl_verify on;
52 proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
53 proxy_ssl_verify_depth 3;
54 proxy_ssl_server_name on;
55
56 root /var/www/aienos.com/current;
57 # Redirects stay relative: this server listens on 4445/4446 behind :443.
58 absolute_redirect off;
59 error_page 404 /404.html;
60
61 access_log /var/log/nginx/aienos.access.log;
62 error_log /var/log/nginx/aienos.error.log;
63
64 include /etc/nginx/snippets/aienos-hive.conf;
65 include /etc/nginx/snippets/aienos-allen.conf;
66 include /etc/nginx/snippets/aienos-agora.conf;
67 # Interim: served .om source is plain UTF-8 text (aienos.com scripts/edge/nginx-om-text.conf).
68 include /etc/nginx/snippets/aienos-om-text.conf;
69 # Installs go through GitHub: /install.sh is a 301 to the repo (aienos.com scripts/edge/nginx-install-redirect.conf).
70 include /etc/nginx/snippets/aienos-install-redirect.conf;
71 # Front door: /si bootstrap and read-only /rad/ git clones (SIFront, 2026-11-07).
72 include /etc/nginx/snippets/aienos-si.conf;
73 include /etc/nginx/snippets/aienos-code.conf;
74 include /etc/nginx/snippets/aienos-replicate.conf;
75 # INTERPLANE Forge at /forge/ (ForgeInfra, 2026-11-07).
76 include /etc/nginx/snippets/aienos-forge.conf;
77
78 location / {
79 # Agents ask for Markdown. Rewrite a page path to its mirror and let
80 # the .md location add the canonical Link header.
81 if ($http_accept ~* "text/markdown") {
82 rewrite ^(.*)/$ $1/index.md last;
83 }
84 try_files $uri $uri/ $uri/index.html =404;
85 types {
86 text/plain tsv tex log aux out toc;
87 }
88 include /etc/nginx/mime.types;
89 charset utf-8;
90 add_header Cache-Control $aienos_cache always;
91 add_header Vary Accept always;
92 add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
93 add_header X-Content-Type-Options nosniff always;
94 add_header Referrer-Policy strict-origin-when-cross-origin always;
95 add_header X-Frame-Options DENY always;
96 add_header Content-Security-Policy "frame-ancestors 'none'" always;
97 }
98
99 location ~ \.md$ {
100 try_files $uri =404;
101 default_type "text/markdown; charset=utf-8";
102 types { }
103 add_header Cache-Control "no-cache" always;
104 add_header Vary Accept always;
105 add_header Link $aienos_md_link always;
106 add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
107 add_header X-Content-Type-Options nosniff always;
108 add_header Referrer-Policy strict-origin-when-cross-origin always;
109 add_header X-Frame-Options DENY always;
110 add_header Content-Security-Policy "frame-ancestors 'none'" always;
111 }
112}
113
114# Apex aienos.com (SiteHub, 2026-11-07): one permanent redirect to www. The
115# :443 SNI router sends aienos.com here with PROXY protocol. Certificate from
116# acme.sh (dns_gandi_livedns, ZeroSSL), /root/.acme.sh/aienos.com_ecc.
117server {
118 listen 127.0.0.1:4447 ssl http2 proxy_protocol; # Spark nginx 1.24: http2 per listen (Pi 1.28 uses "http2 on")
119 server_name aienos.com;
120
121 ssl_certificate /etc/nginx/certs/aienos.com/fullchain.pem;
122 ssl_certificate_key /etc/nginx/certs/aienos.com/key.pem;
123 ssl_protocols TLSv1.2 TLSv1.3;
124 ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
125 ssl_prefer_server_ciphers off;
126 ssl_session_tickets off;
127
128 access_log /var/log/nginx/aienos.access.log;
129 error_log /var/log/nginx/aienos.error.log;
130
131 location / {
132 add_header Strict-Transport-Security "max-age=31536000" always;
133 add_header X-Content-Type-Options nosniff always;
134 return 301 https://www.aienos.com$request_uri;
135 }
136}