{"id":27198477,"url":"https://github.com/valtzu/symfony-nginx-unit-example","last_synced_at":"2026-04-09T16:05:08.944Z","repository":{"id":69453722,"uuid":"568227447","full_name":"valtzu/symfony-nginx-unit-example","owner":"valtzu","description":"Symfony nginx Unit setup with docker compose","archived":false,"fork":false,"pushed_at":"2024-12-27T20:58:49.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T08:33:46.457Z","etag":null,"topics":["docker","docker-compose","nginx-unit","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valtzu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-19T21:07:39.000Z","updated_at":"2024-12-27T20:58:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffb4f9e3-63f5-44bf-bcda-b839c6adc32e","html_url":"https://github.com/valtzu/symfony-nginx-unit-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valtzu/symfony-nginx-unit-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtzu%2Fsymfony-nginx-unit-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtzu%2Fsymfony-nginx-unit-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtzu%2Fsymfony-nginx-unit-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtzu%2Fsymfony-nginx-unit-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valtzu","download_url":"https://codeload.github.com/valtzu/symfony-nginx-unit-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valtzu%2Fsymfony-nginx-unit-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267975918,"owners_count":24174819,"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-07-31T02:00:08.723Z","response_time":66,"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":["docker","docker-compose","nginx-unit","symfony"],"created_at":"2025-04-09T20:39:56.789Z","updated_at":"2026-04-09T16:05:08.915Z","avatar_url":"https://github.com/valtzu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Symfony dev setup using NGINX Unit\n\nThis is an example of Symfony + NGINX Unit using docker \u0026 docker-compose. See also the [official NGINX Unit Symfony example](https://unit.nginx.org/howto/symfony/).\n\n### Usage\n\n```\ngit clone https://github.com/valtzu/symfony-nginx-unit-example\ncd symfony-nginx-unit-example\ndocker-compose up\n```\n\nApp should then respond at http://localhost:8080\n\n## Configuration\n\n### NGINX Unit\n\nNGINX Unit configuration file is stored in a single json file at [config/unit/php-symfony.unit.json](config/unit/php-symfony.unit.json).\n\n### Routing\n\nURLs that do not end with `.php` are first checked in `public/` directory, and if not found, then forwarded to `public/index.php`. Files ending `.php` are always routed to `index.php` so they are likely to never match any route.\n\n### Logging\n\nWhen using `APP_ENV=prod`, all logs except NGINX error logs (mostly startup \u0026 shutdown related) are in JSON format.\n\nUsername is parsed from `Authorization` header for `Basic` auth \u0026 `Bearer` JWT tokens (`sub` or `clientId` claim).\n\n#### Example:\n\n```bash\n$ docker compose up\nunit-1  | {\"channel\":\"php\",\"level\":\"notice\",\"message\":\"The \\\"Monolog\\\\Logger\\\" class is considered final. It may change without further notice as of its next major version. You should not extend it from \\\"Symfony\\\\Bridge\\\\Monolog\\\\Logger\\\".\",\"file\":\"/app/vendor/symfony/error-handler/DebugClassLoader.php:331\",\"request\":{\"id\":null}}\nunit-1  | {\"channel\":\"http\",\"level\":\"info\",\"request\":{\"id\":\"cf84a2f6726ab5a157b86194b81abaab\",\"method\":\"GET\",\"host\":\"localhost\",\"path\":\"/\",\"ipAddress\":\"172.29.0.1\",\"user\":\"foobaz\",\"userAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36\",\"duration\":0.003},\"response\":{\"bodyLength\":82735,\"status\":200}}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaltzu%2Fsymfony-nginx-unit-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaltzu%2Fsymfony-nginx-unit-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaltzu%2Fsymfony-nginx-unit-example/lists"}