Created
June 3, 2020 13:09
-
-
Save wancaibida/4e0e30c2f1c5cc4848f7e492ed4b9d9b to your computer and use it in GitHub Desktop.
Caddyfile v2 example
This file contains hidden or 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
yourdomain.com { | |
tls email@abc.com | |
root * /srv/www | |
file_server | |
handle_errors { | |
@404 { | |
expression int({http.error.status_code}) == 404 | |
} | |
respond @404 "This is 404 error message" | |
} | |
@ws { | |
header Connection Upgrade | |
header Upgrade websocket | |
} | |
reverse_proxy @ws localhost:6443 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment