From 3ccf0e454f535d4c1b5787727e9e1d06be471e85 Mon Sep 17 00:00:00 2001 From: bookcorner Date: Sun, 26 Jul 2026 02:25:33 +0400 Subject: Initial commit --- etc/httpd.conf | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 etc/httpd.conf (limited to 'etc/httpd.conf') diff --git a/etc/httpd.conf b/etc/httpd.conf new file mode 100644 index 0000000..47348e0 --- /dev/null +++ b/etc/httpd.conf @@ -0,0 +1,56 @@ +types { + include "/usr/share/misc/mime.types" +} + +server "bookcorner.ge" { + include "/etc/httpd/_listen80.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + # HTTP 301 Moved Permanently - enforce HTTPS + block return 301 "https://bookcorner.ge$REQUEST_URI" + } +} + +server "bookcorner.ge" { + include "/etc/httpd/_listen443.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + block return 307 "http://git.bookcorner.ge" + } +} + +server "www.bookcorner.ge" { + include "/etc/httpd/_listen80.conf" + include "/etc/httpd/_listen443.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + # HTTP 301 Moved Permanently - enforce non-www site + block return 301 "https://bookcorner.ge$REQUEST_URI" + } +} + +server "git.bookcorner.ge" { + include "/etc/httpd/_listen80.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + # HTTP 301 Moved Permanently - enforce HTTPS + block return 301 "https://git.bookcorner.ge$REQUEST_URI" + } +} + +server "git.bookcorner.ge" { + include "/etc/httpd/_listen443.conf" + include "/etc/httpd/_acme.conf" + + location "/cgit.*" { + root "/cgit" + no fastcgi + } + + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" +} -- cgit v1.2.3