{"id":13828656,"url":"https://github.com/dsamojlenko/php-caddy","last_synced_at":"2025-10-17T07:40:50.758Z","repository":{"id":62539811,"uuid":"80693469","full_name":"dsamojlenko/php-caddy","owner":"dsamojlenko","description":"A tiny PHP development environment for Windows","archived":false,"fork":false,"pushed_at":"2017-03-28T00:35:57.000Z","size":8924,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-18T13:52:58.888Z","etag":null,"topics":["caddy","development-environment","laravel","mailhog","php"],"latest_commit_sha":null,"homepage":"http://www.phpcaddy.co/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsamojlenko.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-02T04:33:43.000Z","updated_at":"2023-12-07T21:07:06.000Z","dependencies_parsed_at":"2022-11-02T16:00:35.974Z","dependency_job_id":null,"html_url":"https://github.com/dsamojlenko/php-caddy","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/dsamojlenko/php-caddy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsamojlenko%2Fphp-caddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsamojlenko%2Fphp-caddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsamojlenko%2Fphp-caddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsamojlenko%2Fphp-caddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsamojlenko","download_url":"https://codeload.github.com/dsamojlenko/php-caddy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsamojlenko%2Fphp-caddy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279304126,"owners_count":26143997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caddy","development-environment","laravel","mailhog","php"],"created_at":"2024-08-04T09:02:57.337Z","updated_at":"2025-10-17T07:40:50.728Z","avatar_url":"https://github.com/dsamojlenko.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# PHP Caddy\n\n## Introduction\nPHP Caddy is a **tiny** PHP development environment for Windows, inspired by Laravel Valet.\n\n**No hosts file, no configuration, no frills.  Just run it and go write some code.**\n\nPHP Caddy is basically a stripped down Valet: no *.dev domain proxy (only localhost), no linking multiple sites or\nparked directories, and no sharing over local tunnels.  It also doesn't require elevated privileges to run\nlike some of the other Windows alternatives, which can make things easier for people in corporate environments.\n\nBuilt with [Caddy](https://caddyserver.com/) web server, PHP Caddy also includes [Mailhog](https://github.com/mailhog/MailHog) \nfor catching email sent by your application.\n\nThis package is for minimalists.  It does not have the full feature set of Valet, and it doesn't provide the\nrobust features of a virtualized environment like Homestead.\n- If you are on macOS you should probably just use [Laravel Valet](https://laravel.com/docs/5.4/valet) because it's awesome.  \n- If you want something more Valet-like for Windows, check out [valet-windows](https://github.com/cretueusebiu/valet-windows).\n- If you want a fully virtualized Linux development environment, use [Laravel Homestead](https://laravel.com/docs/5.4/homestead).\n- If you're on Windows and you want a fast, easy to use local development environment with minimal resource consumption, read on!\n\n## Requirements\n- [PHP (7.1 recommended)](http://windows.php.net/) (installed in C:\\php and configured for Laravel)\n- [Composer](https://getcomposer.org/)\n- A database, if you need one (MySql/Mariadb/Sqlite)\n\n### 502 Bad Gateway\nThere seems to be an issue with long-running php-cgi.exe processes in PHP 7.0 and earlier on Windows.  The process randomly crashes after a period of time, causing a `502 Bad Gateway` in PHP Caddy.\n\nPHP 7.1 introduced the ability to run multiple php-cgi.exe processes, which seems to alleviate this problem.\n\nIf you are getting frequent `502 Bad Gateway` errors, try upgrading to PHP 7.1 and make sure you're running the latest\nPHP Caddy by running `composer global update`.\n\nIf you can't upgrade PHP, then you can restart PHP when this happens using `caddy service php restart`.\n\n## Installation instructions\n```\ncomposer global require samojled/php-caddy\n```\n\n## Usage\nMake sure your global composer vendor/bin folder is in your system path.\n\n### Start it up\n```\ncd {your php project directory}\ncaddy start\n```\n\n- Current directory will be linked \n- Site: http://localhost\n- Mailhog: http://localhost:8025\n- SMTP: 127.0.0.1:1025\n\n### Shut it down\n```\ncaddy stop\n```\n\n### Switch directories (serve a different project)\n```\ncd {another php project}\ncaddy link\n```\n\n### Control individual services\n```\n# Mailhog\ncaddy service mailhog start\ncaddy service mailhog stop\ncaddy service mailhog restart\n\n# Http (Caddy)\ncaddy service http start\ncaddy service http stop\ncaddy service http restart\n\n# PHP\ncaddy service php start\ncaddy service php stop\ncaddy service php restart\n```\n\n### Available Commands\n\n| Command | Description |\n| --- | --- |\n| `caddy install` | Install PHP Caddy services |\n| `caddy link` | Link Caddy to the current directory |\n| `caddy start` | Start the Caddy services and Link the current directory. |\n| `caddy start --without-mailhog` | For a slightly lighter resource footprint |\n| `caddy stop` | Stop the Caddy services |\n| `caddy which` | Determine which Valet driver serves the current working directory |\n| `caddy uninstall` | Remove PHP Caddy services |\n| `caddy service [service] [command]` | Start/Stop/Restart individual services |\n\n## Supported Frameworks and Applications\nPHP Caddy comes with the same default set of drivers as Valet, so out of the box it supports:\n\n- Laravel\n- Lumen\n- Symfony\n- Zend\n- CakePHP 3\n- WordPress\n- Bedrock\n- Craft\n- Statamic\n- Jigsaw\n- Static HTML\n\n### Custom Valet Drivers\n \nYou can write your own Valet driver to support PHP applications not in the list above, in the same way you can with\nLaravel Valet.  \n\nWhen you install PHP Caddy, a `~/.phpcaddy/Drivers` directory is created which contains a `SampleValetDriver.php` file\nyou can use as a guide.  To use your custom driver, either place it in the `~/.phpcaddy/Drivers` directory, or in the \nroot path of your project, and it will be picked up by PHP Caddy.\n\nSee more info on creating custom drivers in the Laravel Valet docs: \n[Custom Valet Drivers](https://laravel.com/docs/5.4/valet#custom-valet-drivers) \n\n## Upgrading\nYou can update PHP Caddy using the `composer global update` command.  After upgrading, you may need to run \n`caddy install` to make any necessary configuration changes.\n\n## License and Attribution\nParts of the original [Laravel Valet](https://laravel.com/docs/5.4/valet) source code were used in whole or in part \nin building this project, and are covered under the original Valet License \n- [Valet License](ValetLicense.txt)\n\nThe Caddy and Mailhog binaries are covered under their respective licenses. \n- [Caddy License](bin/CaddyLicense.txt) \n- [Mailhog License](bin/MailhogLicense.txt)\n\nPHP Caddy is Copyright (c) 2017 Dave Samojlenko and licensed under the MIT license \n- [PHP Caddy License](LICENSE.txt)\n\n![Powered by Caddy](https://raw.githubusercontent.com/dsamojlenko/php-caddy/master/powered-by-caddy.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsamojlenko%2Fphp-caddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsamojlenko%2Fphp-caddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsamojlenko%2Fphp-caddy/lists"}