Last active
February 27, 2025 08:25
-
-
Save gibrandev/2e6496d9dc4bff4812d497063d4c3843 to your computer and use it in GitHub Desktop.
Caddy file php support
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
# Global error logging (MUST be at the top) | |
{ | |
log { | |
output file /var/log/caddy/error.log | |
format json | |
} | |
} | |
localhost { | |
# Set this path to your site's directory. | |
root * /usr/share/caddy | |
# Enable the static file server. | |
file_server | |
# Php | |
php_fastcgi unix//run/php/php8.1-fpm.sock | |
# SSL | |
tls /etc/caddy/keys/cert.pem /etc/caddy/keys/key.pem | |
log { | |
output file /var/log/caddy/access.log | |
format json | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment