Last active
April 27, 2021 23:09
-
-
Save simonmichael/83dc99547d3e8b9195040c9afff5aebe to your computer and use it in GitHub Desktop.
caddy 2 configs, WIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://caddyserver.com/docs/caddyfile/options | |
{ | |
email webmaster@joyful.com | |
} | |
# import everything in this directory beginning with a lowercase letter (not this file, dot files, or autosave files) | |
# import [a-z]* | |
# can't do it with caddy 2 ? | |
#import * | |
import hledger.org | |
import hledger.org.subs | |
import joyful.com | |
import joyful.com.subs | |
import zwiki.org | |
import zwiki.org.subs | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www.hledger.org { | |
redir https://hledger.org{uri} | |
} | |
hledger.org { | |
file_server | |
# serve /VERSION/* from out2, since mdbook can't yet generate these under out | |
@oldmanpath { | |
path /1.0/* | |
path /1.1/* | |
path /1.2/* | |
path /1.3/* | |
path /1.4/* | |
path /1.5/* | |
# path /1.6/* | |
# path /1.7/* | |
# path /1.8/* | |
path /1.9/* | |
path /1.10/* | |
path /1.11/* | |
path /1.12/* | |
path /1.13/* | |
path /1.14/* | |
path /1.15/* | |
path /1.16/* | |
path /1.17/* | |
path /1.18/* | |
path /1.19/* | |
path /1.20/* | |
path /1.21/* | |
path /dev/* | |
} | |
root @oldmanpath /src/hledger/site/out2/ | |
# the main mdbook site | |
root * /src/hledger/site/out | |
log { | |
output file /var/log/caddy/hledger.org.log | |
format single_field common_log | |
} | |
# redirects | |
# make .html extension optional for common paths, and add a few extra shortcuts | |
# rewrite { | |
# r (download|docs|step-by-step|manual|developer-guide|release-notes|faq) | |
# to {1}.html | |
# } | |
redir /contrib CONTRIBUTING.html | |
redir /CONTRIBUTING {uri}.html | |
redir /contributors {uri}.html | |
redir /download {uri}.html | |
redir /faq {uri}.html | |
redir /release-notes {uri}.html | |
redir /roadmap {uri}.html | |
redir /hledger {uri}.html | |
redir /hledger-ui {uri}.html | |
redir /ui /hledger-ui.html | |
redir /hledger-web {uri}.html | |
redir /web /hledger-web.html | |
redir /tutorial basics-tutorial.html | |
redir /hledger-install.sh https://raw.githubusercontent.com/simonmichael/hledger/master/hledger-install/hledger-install.sh | |
# moved content | |
redir /journal /hledger.html | |
redir /csv /hledger.html | |
redir /timeclock /hledger.html | |
redir /timedot /hledger.html | |
redir /journal.html /hledger.html | |
redir /csv.html /hledger.html | |
redir /timeclock.html /hledger.html | |
redir /timedot.html /hledger.html | |
redir /manual.html /hledger.html | |
redir /manual /hledger.html | |
redir /intro.html / | |
redir /intro / | |
redir /wiki / | |
redir /cookbook / | |
redir /basics /basics-tutorial.html | |
redir /docs.html / | |
redir /doc.html / | |
redir /docs / | |
redir /doc / | |
redir /readme /README.html | |
redir /readme.html /README.html | |
redir /contributing /CONTRIBUTING.html | |
redir /contributing.html /CONTRIBUTING.html | |
redir /dev /contributing.html | |
redir /developer-guide /contributing.html | |
redir /developer-guide.html /contributing.html | |
redir /cookbook.html https://github.com/simonmichael/hledger/wiki | |
redir /step-by-step /add.html | |
redir /step-by-step.html /add.html | |
redir /basics-tutorial /add.html | |
redir /basics-tutorial.html /add.html | |
redir /start /index.html | |
redir /start.html /index.html | |
redir /More-docs.html /accounting-links.html | |
redir /1.5/argfiles.html /save-frequently-used-options.html | |
redir /1.9/argfiles.html /save-frequently-used-options.html | |
redir /_static/essentials.html /essentials.html | |
redir /essentials /essentials.html | |
redir /essentials.html /quickstart.html | |
redir /quickstart /quickstart.html | |
redir /customize-default-csv-accounts.html /import-csv.html | |
redir /convert-csv-files.html /import-csv.html | |
# rewrites | |
# rewrite any slug without an extension, to the .html form | |
# try again with caddy2 | |
# rewrite /.*/[^\./]+$ {uri}.html | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# other *.hledger.org hostnames | |
# old site | |
# http://old.hledger.org { | |
# root /src/hledger/site/_build/html | |
# timeouts 30s | |
# log / /var/log/caddy/old.hledger.org_access.log {combined} | |
# errors /var/log/caddy/old.hledger.org_error.log | |
# } | |
# shortcut urls | |
# These are all non-ssl http: for now | |
# code repo | |
http://code.hledger.org { | |
redir https://github.com/simonmichael/hledger | |
} | |
# mail list | |
http://mail.hledger.org http://list.hledger.org { | |
redir http://groups.google.com/group/hledger | |
} | |
# irc channel | |
http://irc.hledger.org { | |
redir http://webchat.freenode.net?channels=hledger | |
# redir http://webchat.freenode.net?channels=hledger&randomnick=1 | |
# can't do this one ? | |
#redir https://kiwiirc.com/nextclient/#ircs://irc.freenode.net/#hledger | |
} | |
# matrix access to irc channel, any client | |
http://matrix.hledger.org http://riot.hledger.org { | |
redir "https://matrix.to/#/#freenode_#hledger:matrix.org" | |
} | |
# matrix accss to irc channel, element web client | |
http://element.hledger.org { | |
redir "https://app.element.io/#/room/#freenode_#hledger:matrix.org" | |
} | |
# HEP doc | |
# http://hep.hledger.org { | |
# redir https://github.com/simonmichael/hledger/issues/462 | |
# } | |
# new bug form | |
http://bugs.hledger.org/new { | |
redir "https://github.com/simonmichael/hledger/issues/new?labels=A+BUG&template=a-bug.md" | |
} | |
# new generic issue form | |
http://issues.hledger.org/new { | |
redir https://github.com/simonmichael/hledger/issues/new | |
} | |
# all bugs | |
http://bugs.hledger.org { | |
redir "https://github.com/simonmichael/hledger/issues?q=is:issue+label:\"A BUG\"" | |
# TODO bugs.hledger.org/N | |
} | |
# all issues and PRs | |
http://issues.hledger.org { | |
redir https://github.com/simonmichael/hledger/issues?q=is%3Aissue | |
} | |
# open wishlist issues | |
http://wishes.hledger.org { | |
redir "https://github.com/simonmichael/hledger/issues?q=is:issue+is:open+label:\"A WISH\"" | |
} | |
# open pull requests | |
http://prs.hledger.org { | |
redir https://github.com/simonmichael/hledger/pulls?q=is:open | |
} | |
# draft open pull requests | |
http://draftprs.hledger.org { | |
redir https://github.com/simonmichael/hledger/pulls?q=is:open+is%3Adraft | |
} | |
# ready open pull requests | |
http://readyprs.hledger.org { | |
redir https://github.com/simonmichael/hledger/pulls?q=is:open+-is%3Adraft | |
} | |
# old trello board | |
http://trello.hledger.org { | |
redir https://trello.com/board/hledger-planning-board/5127f6bb0698a36663002981 | |
} | |
http://ci.hledger.org { | |
redir https://github.com/simonmichael/hledger/actions | |
} | |
# travis.hledger.org { | |
# redir https://travis-ci.org/simonmichael/hledger | |
# } | |
# appveyor.hledger.org { | |
# redir https://ci.appveyor.com/project/simonmichael/hledger | |
# } | |
# http://azure.hledger.org { | |
# redir https://dev.azure.com/simonmic/hledger/_build | |
# } | |
http://hydra.hledger.org { | |
redir https://hydra.nixos.org/search?query=hledger | |
} | |
http://etherpad.hledger.org { | |
# redir https://oasis.sandstorm.io/shared/252YL6ZzO11as1qxEZGLHw3ViO-UjEIaU8Btov9V68C | |
redir https://scalar.vector.im/etherpad/p/!IxhnXkEYINuyPlarpx_matrix.org | |
} | |
http://paste.hledger.org { | |
redir https://ghostbin.co/ | |
} | |
http://pasteimg.hledger.org { | |
redir https://pasteboard.co/ | |
} | |
http://waffle.hledger.org { | |
redir https://waffle.io/simonmichael/hledger?source=simonmichael%2Fhledger | |
} | |
http://stars.hledger.org { | |
redir https://github.com/search?o=desc&p=4&q=language%3AHaskell+stars%3A%3E=1297&ref=searchresults&s=stars&type=Repositories | |
} | |
http://wiki.hledger.org { | |
redir https://github.com/simonmichael/hledger/wiki | |
} | |
http://comments.hledger.org { | |
reverse_proxy localhost:8042 | |
} | |
http://demo.hledger.org { | |
reverse_proxy localhost:5000 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment