include Dockerfile used to proxy qemu.org to gitlab.io
PATCH 1/1 include Dockerfile used to proxy qemu.org to gitlab.io
The server configuration used to actually publish qemu-web.git to qemu.org together with the sphinx documentation, right now, is hidden in the machine that runs qemu.org.
Include it in the qemu-web.git website for documentation purpose, in the format of a Dockerfile that you can use to run your own qemu.org website.
Note: this container is not yet in use, but it is already live and can be tested by adding
20.218.253.93 qemu.org www.qemu.org git.qemu.org qemu-project.org www.qemu-project.org git.qemu-project.org
to your /etc/hosts file.
--- container/Dockerfile | 6 ++++ container/README | 31 +++++++++++++++++++++ container/conf.d/git.conf | 13 +++++++++ container/conf.d/noname.conf | 11 ++++++++ container/conf.d/ssl.conf | 1 + container/conf.d/www.conf | 54 ++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 container/Dockerfile create mode 100644 container/README create mode 100644 container/conf.d/git.conf create mode 100644 container/conf.d/noname.conf create mode 100644 container/conf.d/ssl.conf create mode 100644 container/conf.d/www.conf
container/Dockerfile new file +6 -0
@@ -0,0 +1,6 @@ +FROM quay.io/centos/centos:stream9 +EXPOSE 80 +RUN dnf install -y httpd-core mod_ssl +COPY conf.d /etc/httpd/conf.d +CMD /usr/sbin/httpd -DNO_DETACH -DFOREGROUND +
container/README new file +31 -0
@@ -0,0 +1,31 @@ +This is a Dockerfile for a container that serves the following hosts: + +- qemu.org, www.qemu.org: a proxy server that "hides" the fact that + the QEMU web pages are actually hosted as GitLab pages under either + qemu-project.gitlab.io/qemu (the documentation) or + qemu-project.gitlab.io/qemu-web (the main website) + +- git.qemu.org: a simple redirect to gitlab.com/qemu-project for + both web browsers and git's smart HTTP backend + + +A sample systemd service that publishes the website on port 8082 +is as follows: + +``` +[Unit] +Description=Podman instance control service for Apache proxy server +Requires=network.target +After=network.target +StartLimitIntervalSec=0 + +[Service] +Restart=always +ExecStartPre=-podman stop qemu-web ; -podman rm qemu-web +ExecStart=podman run --name qemu-web --publish=8082:80 qemu:qemu-web +ExecStop=podman stop -t 10 qemu-web +RestartSec=60 + +[Install] +WantedBy=default.target +```
container/conf.d/git.conf new file +13 -0
@@ -0,0 +1,13 @@ +<VirtualHost *:80> + ServerName git.qemu.org + ServerAlias git.qemu.org + + RewriteEngine On + + RewriteRule ^/(git/)?([^/?;]+)\.git(/?|/HEAD|/info/.*|/objects/.*|/git-(upload|receive)-pack)$ http://gitlab.com/qemu-project/$2$3 [R,L] + RewriteRule ^/$ https://gitlab.com/qemu-project/ [R] + RewriteRule ^(/[^/?;]+\.git)$ https://gitlab.com/qemu-project/$1/ [R] + + Options -Indexes + +</VirtualHost>
container/conf.d/noname.conf new file +11 -0
@@ -0,0 +1,11 @@ +<VirtualHost *:80> + ServerName qemu.org + ServerAlias qemu.org + + RewriteEngine On + + RewriteRule ^(.*) https://www.qemu.org$0 [R=301] + + Options -Indexes + +</VirtualHost>
container/conf.d/ssl.conf new file +1 -0
@@ -0,0 +1 @@ +# do nothing, ssl is handled outside the container
container/conf.d/www.conf new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.40.1
Quoted 24 lines · Paolo Bonzini
The server configuration used to actually publish qemu-web.git to qemu.org together with the sphinx documentation, right now, is hidden in the machine that runs qemu.org.
Include it in the qemu-web.git website for documentation purpose, in the format of a Dockerfile that you can use to run your own qemu.org website.
Note: this container is not yet in use, but it is already live and can be tested by adding
20.218.253.93 qemu.org www.qemu.org git.qemu.org qemu-project.org www.qemu-project.org git.qemu-project.org
to your
/etc/hostsfile.Signed-off-by Paolo Bonzini <[email protected]>--- container/Dockerfile | 6 ++++ container/README | 31 +++++++++++++++++++++ container/conf.d/git.conf | 13 +++++++++ container/conf.d/noname.conf | 11 ++++++++ container/conf.d/ssl.conf | 1 + container/conf.d/www.conf | 54 ++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+)
Quoted 6 lines
create mode 100644 container/Dockerfile
create mode 100644 container/README
create mode 100644container/conf.d/git.conf
create mode 100644container/conf.d/noname.conf
create mode 100644container/conf.d/ssl.conf
create mode 100644container/conf.d/www.conf