MAN5_PAGES := \
proxmox-offline-mirror.cfg.5
+EXAMPLE_FILES := \
+ examples/nginx-conf
+
# Sphinx documentation setup
SPHINXOPTS =
SPHINXBUILD = sphinx-build
${SPHINXBUILD} ${SPHINXOPTS} -b man ./ ${BUILDDIR}/man
.PHONY: html
-html: ${GENERATED_SYNOPSIS} images/proxmox-logo.svg custom.css conf.py ${PRUNE_SIMULATOR_FILES} ${LTO_BARCODE_FILES} ${API_VIEWER_SOURCES}
+html: ${GENERATED_SYNOPSIS} images/proxmox-logo.svg custom.css conf.py ${PRUNE_SIMULATOR_FILES} ${LTO_BARCODE_FILES} ${API_VIEWER_SOURCES} ${EXAMPLE_FILES}
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
install -m 0644 custom.js custom.css images/proxmox-logo.svg $(BUILDDIR)/html/_static/
@echo
install -dm755 $(DESTDIR)$(DOCDIR)
install -m 0644 output/latex/ProxmoxOfflineMirror.pdf $(DESTDIR)$(DOCDIR)/proxmox-offline-mirror.pdf
+install_examples: ${EXAMPLE_FILES}
+ install -dm755 $(DESTDIR)$(DOCDIR)/examples
+ install -m 0644 examples/nginx-conf $(DESTDIR)$(DOCDIR)/examples
+
ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
install: install_manual_pages
else
-install: install_manual_pages install_html install_pdf
+install: install_manual_pages install_html install_pdf install_examples
endif
--- /dev/null
+# with the correct dns setup and path this corresponds to a sources.lists entry
+# deb [ check-valid-until=false ] http://proxmox-offline-mirror.domain.example/<mirror-name>/<snapshot-timestamp> <codename> <suite>
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+
+ server_name proxmox-offline-mirror.domain.example;
+
+ root /path/to/medium;
+ disable_symlinks off;
+ autoindex on;
+
+ error_log /var/log/nginx/proxmox-offline-mirror.error.log;
+ access_log /var/log/nginx/proxmox-offline-mirror.access.log;
+
+ location / {
+ try_files $uri $uri/ =404;
+ }
+}
+
This snippet can be saved to the ``/etc/apt/sources.list.d`` directory. The default file name is
``offline-mirror.list``. Don't forget to remove the snippet after the upgrade is done.
+You can also configure an HTTP server to provide the snapshots in your internal network.
+A minimal sample configuration for `nginx`:
+
+ .. literalinclude:: examples/nginx-conf
+
+The corresponding ``/etc/apt/sources.list.d`` file should contain
+
+.. code-block:: sources.list
+
+ deb [ check-valid-until=false ] http://proxmox-offline-mirror.domain.example/<mirror-name>/<snapshot-timestamp> <codename> <suite>
+
+
To activate or update an offline subscription key, either use ``proxmox-offline-mirror-helper offline-key`` or
``proxmox-offline-mirror-helper setup``.