Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

Serve published files from storage.progmasoft.com

Add the nginx file of storage.progmasoft.com, which serves the PM-SPL
1.0 texts in /pm-spl/1.0/ beside their SHA-256 sums, immutable and to
any origin, and say in ops/README.md how it is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit
e6b80ca4547aba0be721a315e070632da05c337f
Author
Leitwolf11 ·
Parents
5e122d8bd74b

Files · Download .tar.gz

Changes

 ops/README.md                  | 17 ++++++++++
 ops/storage/nginx/storage.conf | 70 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/ops/README.md b/ops/README.md
index 252bfb0..18945cc 100644
--- a/ops/README.md
+++ b/ops/README.md
@@ -316,6 +316,23 @@ ssh root@91.151.88.130 'chown -R root:root /srv/schemastore && chmod 0644 /srv/s
 A schema's `$id` is its address. A change that would reject files the schema accepted before gets a new file name
 instead. The certificate of `progmasoft.com` must name `schemastore.progmasoft.com`.
 
+## Storage
+
+`storage.progmasoft.com` serves files Progmasoft publishes, each beside its `.sha256sums`: the license texts in
+`/pm-spl/<version>/` as `LICENSE-<version>.txt`, `.md` and `.rst`, the same files as in Progmasoft/licenses. It has no
+listing and no pages; a published version never changes, so its files are cached as immutable. Files live in
+`/srv/progmasoft-storage`, served by `ops/storage/nginx/storage.conf` (installed as
+`/etc/nginx/conf.d/storage.conf`):
+
+```sh
+semanage fcontext -a -t httpd_sys_content_t '/srv/progmasoft-storage(/.*)?'
+install -d -m 0755 /srv/progmasoft-storage/pm-spl/1.0
+scp LICENSE-1.0.* root@91.151.88.130:/srv/progmasoft-storage/pm-spl/1.0/
+ssh root@91.151.88.130 'chown -R root:root /srv/progmasoft-storage && restorecon -R /srv/progmasoft-storage'
+```
+
+The certificate of `progmasoft.com` must name `storage.progmasoft.com`.
+
 ## Git mirrors
 
 `git.progmasoft.com` shows read-only mirrors of the public repositories under development, such as
diff --git a/ops/storage/nginx/storage.conf b/ops/storage/nginx/storage.conf
new file mode 100644
index 0000000..b0516af
--- /dev/null
+++ b/ops/storage/nginx/storage.conf
@@ -0,0 +1,70 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+# https://storage.progmasoft.com: published files of Progmasoft, such as the
+# license texts in /pm-spl/<version>/, each beside its .sha256sums. Files only:
+# no listing, no pages. Served from /srv/progmasoft-storage; installed as
+# /etc/nginx/conf.d/storage.conf.
+
+server {
+    listen 80;
+    listen [::]:80;
+    server_name storage.progmasoft.com;
+    server_tokens off;
+
+    location ^~ /.well-known/acme-challenge/ {
+        root /var/lib/letsencrypt;
+        default_type text/plain;
+    }
+
+    location / {
+        return 308 https://storage.progmasoft.com$request_uri;
+    }
+}
+
+server {
+    listen 443 ssl;
+    listen [::]:443 ssl;
+    http2 on;
+    server_name storage.progmasoft.com;
+    server_tokens off;
+
+    ssl_certificate /etc/letsencrypt/live/progmasoft.com/fullchain.pem;
+    ssl_certificate_key /etc/letsencrypt/live/progmasoft.com/privkey.pem;
+    include /etc/letsencrypt/options-ssl-nginx.conf;
+
+    root /srv/progmasoft-storage;
+    autoindex off;
+    client_max_body_size 1k;
+
+    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
+    add_header X-Content-Type-Options "nosniff" always;
+    add_header Access-Control-Allow-Origin "*" always;
+    add_header X-Robots-Tag "noindex" always;
+
+    # A published license text never changes; a change is a new version.
+    location ~ "^/pm-spl/[0-9]+\.[0-9]+/" {
+        limit_except GET {
+            deny all;
+        }
+        types {
+            text/plain txt sha256sums;
+            text/markdown md;
+            text/x-rst rst;
+        }
+        default_type application/octet-stream;
+        charset utf-8;
+        charset_types text/plain text/markdown text/x-rst;
+        expires 1y;
+        add_header Cache-Control "public, immutable" always;
+        add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
+        add_header X-Content-Type-Options "nosniff" always;
+        add_header Access-Control-Allow-Origin "*" always;
+        add_header X-Robots-Tag "noindex" always;
+        try_files $uri =404;
+    }
+
+    location / {
+        return 404;
+    }
+}