-
-
Notifications
You must be signed in to change notification settings - Fork 157
Add default Caddyfile for FrankenPHP that mimics the FPM-NGINX experience #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default Caddyfile for FrankenPHP that mimics the FPM-NGINX experience #527
Conversation
@jaydrogers it aint quite right yet. I'm adding more to this branch. Caddy syntax is a bit different too. I'm trying to figure out the best way to enable SSL. There is also an automatic tls but it's not working for me. |
Ok, figured out the automatic https. Now I need to figure out how to best structure the caddyfile |
Thanks @hookenz! I greatly appreciate your help to dive in and test some things for me. Recently I've been buried in client projects, but I will swing back to this as soon as I get a chance. I've had a lot of thoughts on Franken since I originally put my first PR together. Will keep you posted 👍 |
@hookenz it's been a while and actually frankenphp has some nice updates that have impact on this PR. |
I think we should either build the Caddyfile externally or like php unit, start with a simple config file and enable tls config via curl calls to it's api. I think it can be much simpler than it is. To enable automatic tls you don't put the port numbers, just a servername and it's done. Also the output from caddy can be a bit hard to read. For an ever so slightly more human readable form set this globally.
Also discovered that if you pass "-t" to the container, caddy will detect tty use the above automatically. |
Thanks for waking this PR up. It came at a perfect time. I have a ton of thoughts, but I need to run out the door right now 🤪 Let me circle back to this, get the merge conflicts fixed, and see if we can get this merged into my new approach to building FrankenPHP |
…ankenphp-variation
…file-permissions" across OS's
…ersideup-set-file-permissions script
…r improved container initialization
- Introduced new environment variables for Caddy configuration in the Dockerfile, including options for admin interface, public path, and HTTPS settings. - Updated the Caddyfile to support different SSL modes (off, mixed, full) with corresponding configurations. - Enhanced the SSL generation script to skip certificate generation when SSL mode is off. - Added new Caddyfile imports for structured configuration management. - Improved logging and health check responses in the Caddyfile.
…ing improvements - Added trusted proxies configuration to support Docker and Cloudflare. - Introduced client IP header handling for better client identification. - Updated static file handling with improved caching headers and logging for specific files. - Implemented security headers to mitigate common web vulnerabilities. - Imported security settings into SSL mode configurations for full and mixed modes.
- Introduced new environment variables for log formatting and log levels. - Updated the Caddyfile to import log level configurations for both global and address-specific logging. - Created separate Caddyfile configurations for various log levels (debug, info, warn, error, crit, alert, emerg) to enhance logging granularity. - Adjusted Dockerfile to include new log-level configuration files in the container.
a3d592c
into
serversideup:280-create-a-frankenphp-variation
Thanks @hookenz for giving me a place to start! I learned a lot with Caddyfile snippets and was able to make a pretty cool process to get this going. I just merged into the main FrankenPHP branch for further testing 👍 |
What this PR does
Related PR
The current PR is for preparation to be merged into:
Feature status
SSL_MODE
PHP_OPCACHE_ENABLE
worksLOG_OUTPUT_LEVEL
Good examples
Original post by @hookenz
This post was edited by @jaydrogers, but the original post by @hookenz is preserved here:
@hookenz original Post