CentOS 7 Nginx环境安装simpleSamlPhp

本文详细介绍了如何在CentOS 7.6 x64系统上,结合Nginx 1.6.0和PHP 7.3.6环境,成功安装和配置simpleSamlPhp。重点讲述了simpleSamlPhp源码的部署位置及Nginx配置文件的设置,确保应用能够正常运行。
摘要由CSDN通过智能技术生成

本文在CentOS 7.6 x64系统 + Nginx 1.6.0 + PHP 7.3.6环境下验证通过

假设simpleSamlPhp源码解压缩在/srv/www/simplesamlphp目录

Nginx的配置如下

server {
    listen       82;
    server_name  localhost;

    set $root_path '/srv/www/simplesamlphp/www';
    root $root_path;

    index index.php index.html index.htm;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    location /simplesaml {
        # Location Access and error log files.                                           
        access_log /var/log/nginx/simplesaml.access.log;                       
        error_log /var/log/nginx/simplesaml.error.log;

        # add alias root to global simple saml install
        alias /srv/www/simplesamlphp/www;

        index index.php;

        location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
            fastcgi_split_
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值