{"id":19033139,"url":"https://github.com/mrsuh/nginx-session-handler","last_synced_at":"2026-04-30T11:35:35.621Z","repository":{"id":57021145,"uuid":"45545675","full_name":"mrsuh/nginx-session-handler","owner":"mrsuh","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-02T15:46:30.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T05:53:01.113Z","etag":null,"topics":["nginx","nginx-session-handler","redis","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://mrsuh.com/articles/2015/nginx-lua-redis-efficiently-processing-sessions-and-delivering-data/","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/mrsuh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-11-04T14:52:10.000Z","updated_at":"2024-11-16T21:39:15.000Z","dependencies_parsed_at":"2024-11-08T21:35:49.180Z","dependency_job_id":null,"html_url":"https://github.com/mrsuh/nginx-session-handler","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":"0.30000000000000004","last_synced_commit":"7f938cb39ff30148adf111488fd99ace0fad86b9"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/mrsuh/nginx-session-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsuh%2Fnginx-session-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsuh%2Fnginx-session-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsuh%2Fnginx-session-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsuh%2Fnginx-session-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsuh","download_url":"https://codeload.github.com/mrsuh/nginx-session-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsuh%2Fnginx-session-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["nginx","nginx-session-handler","redis","symfony-bundle"],"created_at":"2024-11-08T21:35:44.428Z","updated_at":"2026-04-30T11:35:30.607Z","avatar_url":"https://github.com/mrsuh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-session-handler #\n\n[![Latest Stable Version](https://poser.pugx.org/mrsuh/nginx-session-handler/v/stable)](https://packagist.org/packages/mrsuh/nginx-session-handler)\n[![Total Downloads](https://poser.pugx.org/mrsuh/nginx-session-handler/downloads)](https://packagist.org/packages/mrsuh/nginx-session-handler)\n[![License](https://poser.pugx.org/mrsuh/nginx-session-handler/license)](https://packagist.org/packages/mrsuh/nginx-session-handler)\n\nThis bundle integrates [predis](https://github.com/nrk/predis) and [snc/redis-bundle](https://github.com/snc/SncRedisBundle) into your Symfony 3/4 application\nSo, you need to configure the bundles too.\n\n## Installation ##\n\nAdd the nginx-session-handler package to your require section in the composer.json file.\n\n```bash\ncomposer require mrsuh/nginx-session-handler:2.*\n```\n\nAdd the NginxSessionHandlerBundle to your application's kernel (Symfony 3):\n\n``` php\n\u003c?php\npublic function registerBundles()\n{\n    $bundles = array(\n        // ...\n        new Mrsuh\\NginxSessionHandlerBundle\\MrsuhNginxSessionHandlerBundle(),\n        // ...\n    );\n    ...\n}\n```\n\nConfigure the `session`  in your `config.yml`:\n```yaml\nframework:\n    session:\n        handler_id:  mrsuh.session_handler\n\nmrsuh_nginx_session_handler:\n    session_lifetime: 3600\n    session_prefix: phpsession\n\n```\n\nAdd  `session.lua` script to your nginx.conf\n```apacheconf\nlocation /security {\n    content_by_lua_file session.lua;\n}\n```\n\nNow your php session locate in redis. Your location `/security` allow for authenticated users with role ROLE_ADMIN only.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsuh%2Fnginx-session-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsuh%2Fnginx-session-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsuh%2Fnginx-session-handler/lists"}