diff options
| author | maddaat <git@maddaat.org> | 2026-04-13 18:08:28 +0400 |
|---|---|---|
| committer | maddaat <git@maddaat.org> | 2026-04-13 19:27:41 +0400 |
| commit | e8318269d15a5b5f603079fa5ad045087374cb13 (patch) | |
| tree | 113e47c1bea426d5e4c913384c4b8550cef558c4 /etc/httpd.conf | |
| parent | 048968b8e0586eb86ad2c406fe0273670c1c1a43 (diff) | |
| download | infra-master.tar infra-master.tar.gz infra-master.tar.bz2 infra-master.tar.lz infra-master.tar.xz infra-master.tar.zst infra-master.zip | |
Diffstat (limited to 'etc/httpd.conf')
| -rw-r--r-- | etc/httpd.conf | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/etc/httpd.conf b/etc/httpd.conf index 3defb8c..a8d1527 100644 --- a/etc/httpd.conf +++ b/etc/httpd.conf @@ -3,15 +3,48 @@ types { } server "maddaat.org" { - listen on * port 80 + include "/etc/httpd/_listen80.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + # HTTP 301 Moved Permanently - enforce HTTPS + block return 301 "https://maddaat.org$REQUEST_URI" + } +} + +server "maddaat.org" { + include "/etc/httpd/_listen443.conf" + include "/etc/httpd/_acme.conf" location "*" { block return 307 "http://git.maddaat.org" } } +server "www.maddaat.org" { + 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://maddaat.org$REQUEST_URI" + } +} + +server "git.maddaat.org" { + include "/etc/httpd/_listen80.conf" + include "/etc/httpd/_acme.conf" + + location "*" { + # HTTP 301 Moved Permanently - enforce HTTPS + block return 301 "https://git.maddaat.org$REQUEST_URI" + } +} + server "git.maddaat.org" { - listen on * port 80 + include "/etc/httpd/_listen443.conf" + include "/etc/httpd/_acme.conf" location "/cgit.*" { root "/cgit" |
