From 2364f6b1bf63121e760123791db12dc4ebe6e8b6 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 16 Aug 2019 15:24:45 +0530 Subject: [PATCH] Add Caddyfile Signed-off-by: Harsh Shandilya --- Caddyfile | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 71 insertions(+) create mode 100644 Caddyfile diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..7fc6cca --- /dev/null +++ b/Caddyfile @@ -0,0 +1,67 @@ +(base_config) { + gzip + tls { + dns cloudflare + } +} + +(proxy_config) { + try_duration 5s + transparent +} + +https://msfjarvis.website { + import base_config + root /var/www/msfjarvis.website/ + git { + repo https://github.com/msfjarvis/msfjarvis.website + branch src + path ../site_raw + hook /githook {$WEBHOOK_PASSWORD} + then git submodule update --init --recursive + then hugo --destination=/var/www/msfjarvis.website + } +} + +https://build.msfjarvis.website { + import base_config + proxy / http://localhost:8080 { + import proxy_config + } +} + +https://docker.msfjarvis.website { + import base_config + proxy / http://localhost:9000 { + import proxy_config + } +} + +https://download.msfjarvis.website { + import base_config + root /var/www/download.msfjarvis.website + fastcgi / /run/php/php7.2-fpm.sock php + rewrite { + if {path} ends_with / + to {dir}/index.html {dir}/index.php /_h5ai/public/index.php + } +} + +https://git.msfjarvis.website { + import base_config + proxy / http://localhost:3000 { + import proxy_config + } +} + +https://wallabag.msfjarvis.website { + import base_config + proxy / http://localhost:8081 { + import proxy_config + } +} + +https://nathanchance.me { + redir https://nathanchance.dev{uri} + import base_config +} diff --git a/README.md b/README.md index 05409ae..8489403 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ ## server-config Configuration files for various parts of my webserver + +### Files + +- [Caddyfile](Caddyfile): Configuration file for [caddyserver](https://caddyserver.com) instance that powers everything on my webserver.