Skip to content

Instantly share code, notes, and snippets.

@JanTvrdik
Last active Jan 3, 2020
Embed
What would you like to do?
Caddy server configuration for PHP, Nette and h5ai
localhost:80, localhost:443 {
root C:\Projects
log C:\Web\Soft\Caddy\access.log
errors C:\Web\Soft\Caddy\errors.log
tls {
# see https://gist.github.com/JanTvrdik/d22f53604f3bfd78df3863cf1ad87b8a
load C:\Web\Soft\Caddy\certificates
}
fastcgi / 127.0.0.1:9300 php {
}
# Application Rewrites
rewrite /nette/sandbox/www/ {
to {path} /nette/sandbox/www/index.php
}
# Fallback Rewrite
rewrite {
if {path} ends_with /
to {dir}/index.html {dir}/index.php /+h5ai/server/php/index.php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment