承接 mrsuh/nginx-session-handler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mrsuh/nginx-session-handler

最新稳定版本:3.0.0

Composer 安装命令:

composer require mrsuh/nginx-session-handler

包简介

Nginx session handler

README 文档

README

Latest Stable Version Total Downloads License

This bundle integrates predis and snc/redis-bundle into your Symfony 3/4 application So, you need to configure the bundles too.

Installation

Add the nginx-session-handler package to your require section in the composer.json file.

composer require mrsuh/nginx-session-handler:2.*

Add the NginxSessionHandlerBundle to your application's kernel (Symfony 3):

<?php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Mrsuh\NginxSessionHandlerBundle\MrsuhNginxSessionHandlerBundle(),
        // ...
    );
    ...
}

Configure the session in your config.yml:

framework:
    session:
        handler_id:  mrsuh.session_handler

mrsuh_nginx_session_handler:
    session_lifetime: 3600
    session_prefix: phpsession

Add session.lua script to your nginx.conf

location /security {
    content_by_lua_file session.lua;
}

Now your php session locate in redis. Your location /security allow for authenticated users with role ROLE_ADMIN only.

统计信息

  • 总下载量: 2.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-04