diff options
| author | Leitwolf11 | 2026-11-18 05:51:04 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-18 05:51:04 +0300 |
| commit | 1a6672d524744fc843d34bf5b64b2dc23331d19b (patch) | |
| tree | 18b5aa06666be398c3b9e290934069635c23f776 | |
| parent | 84a0953693165231617ff3da3aab21ff5fba4263 (diff) | |
| parent | 85e12462e78ef28f9ee2da5845c44a784df77cc0 (diff) | |
| download | progmaweb-site/license-pages.tar.gz | |
Merge remote-tracking branch 'origin/ops/storage-host' into site/license-pagessite/license-pages
| -rw-r--r-- | ops/README.md | 17 | ||||
| -rw-r--r-- | ops/storage/nginx/storage.conf | 70 |
2 files changed, 87 insertions, 0 deletions
diff --git a/ops/README.md b/ops/README.md index 6091810..b8eeac2 100644 --- a/ops/README.md +++ b/ops/README.md @@ -317,6 +317,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; + } +} |