[pmg-devel] [PATCH pmg-docs] add new pmg-docs-apache package

Stoiko Ivanov s.ivanov at proxmox.com
Wed May 29 16:18:20 CEST 2019


containing a short apache-config snippet for delivering the pmg-docs via apache.

Mostly added for consistency between pve-docs (containing pve-docs-mediawiki)
and pmg-docs (containing pmg-docs-apache, because it does not have a wiki)

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 debian/control                            |  7 +++++++
 debian/pmg-docs-apache.docs               |  1 +
 debian/pmg-docs-apache.install            |  1 +
 debian/tree/pmg-docs-apache/README        | 22 ++++++++++++++++++++++
 debian/tree/pmg-docs-apache/pmg-docs.conf |  5 +++++
 5 files changed, 36 insertions(+)
 create mode 100644 debian/pmg-docs-apache.docs
 create mode 100644 debian/pmg-docs-apache.install
 create mode 100644 debian/tree/pmg-docs-apache/README
 create mode 100644 debian/tree/pmg-docs-apache/pmg-docs.conf

diff --git a/debian/control b/debian/control
index 81623e5..d92c890 100644
--- a/debian/control
+++ b/debian/control
@@ -26,3 +26,10 @@ Section: doc
 Architecture: all
 Description: Proxmox Mail Gateway Documentation
  This package contains the Proxmox Mail Gateway documentation files.
+
+Package: pmg-docs-apache
+Architecture: all
+Section: doc
+Depends: pmg-docs,
+Suggests: apache2,
+Description: Proxmox Mailgateway Documentation - Apache2 config
diff --git a/debian/pmg-docs-apache.docs b/debian/pmg-docs-apache.docs
new file mode 100644
index 0000000..786c892
--- /dev/null
+++ b/debian/pmg-docs-apache.docs
@@ -0,0 +1 @@
+debian/tree/pmg-docs-apache/README
diff --git a/debian/pmg-docs-apache.install b/debian/pmg-docs-apache.install
new file mode 100644
index 0000000..5c9d82a
--- /dev/null
+++ b/debian/pmg-docs-apache.install
@@ -0,0 +1 @@
+debian/tree/pmg-docs-apache/pmg-docs.conf /etc/apache2/conf-available/
diff --git a/debian/tree/pmg-docs-apache/README b/debian/tree/pmg-docs-apache/README
new file mode 100644
index 0000000..25c6352
--- /dev/null
+++ b/debian/tree/pmg-docs-apache/README
@@ -0,0 +1,22 @@
+Include the shipped config-snippet in the virtualhost you wish to serve
+the documentation from:
+
+```
+Include /etc/apache2/conf-available/pmg-docs.conf
+```
+
+If pmg-docs is the only vhost on the host you can also globally enable
+the config-snippet:
+
+# a2enconf pmg-docs.conf
+
+in both cases reload apache2 afterwards
+# systemctl reload apache2
+
+Now you should be able to access the documentation at:
+
+* Admin Guide and Manual pages
+http://your-server/pmg-docs
+
+* API Viewer
+http://your-server/pmg-docs/api-viewer
diff --git a/debian/tree/pmg-docs-apache/pmg-docs.conf b/debian/tree/pmg-docs-apache/pmg-docs.conf
new file mode 100644
index 0000000..8aca013
--- /dev/null
+++ b/debian/tree/pmg-docs-apache/pmg-docs.conf
@@ -0,0 +1,5 @@
+Alias "/pmg-docs" "/usr/share/pmg-docs/"
+
+# redirect main page to the reference docs
+RewriteEngine on
+RewriteRule  "^/$" "http://%{HTTP_HOST}/pmg-docs/" [R,L]
-- 
2.11.0




More information about the pmg-devel mailing list