diff options
Diffstat (limited to 'etc/httpd.conf')
| -rw-r--r-- | etc/httpd.conf | 56 |
1 files changed, 56 insertions, 0 deletions
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" +} |
