Skip to content

Instantly share code, notes, and snippets.

@JanTvrdik
Last active January 3, 2020 09:47
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JanTvrdik/33d9996f660164a143fd8f5bebf193c7 to your computer and use it in GitHub Desktop.
Save JanTvrdik/33d9996f660164a143fd8f5bebf193c7 to your computer and use it in GitHub Desktop.
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