栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

五十八章 Nginx TP5 SSL证书配置文件

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

五十八章  Nginx TP5 SSL证书配置文件

    server {

        charset utf-8;

        client_max_body_size 128M;

        listen 80;

        server_name xuegj.com;

#       root  /data/www/v03/public;

 #       index  index.php;

        listen       443 ssl  default_server;

     #   listen       [::]:443 ssl http2 default_server;

  #      server_name  _;

        root         /data/www/v03/public;

        index  index.php;

        ssl on;

        ssl_certificate  1_xxx.com_bundle.crt;

        ssl_certificate_key 2_xxx.com.key;

        ssl_session_cache shared:SSL:1m;

        ssl_session_timeout  10m;

        ssl_ciphers HIGH:!aNULL:!MD5;

        ssl_prefer_server_ciphers on;

        location ~* .(eot|otf|ttf|woff)$ {

            add_header Access-Control-Allow-Origin *;

        }

        location / {

            index    index.html index.php;

            if ( -f $request_filename) {

                break;

            }

            if ( !-e $request_filename) {

                rewrite ^/(.*)$ /index.php/$1 last;

                break;

            }

        }

        location ~ .php {

                set $script $uri;

            set $path_info "";

            if ($uri ~ "^(.+.php)(/.+)") {

                set $script $1;

                set $path_info $2;

            }

            include   fastcgi_params;

            fastcgi_index    index.php?IF_REWRITE=1;

                fastcgi_pass   127.0.0.1:9000;

                fastcgi_param    PATH_INFO    $path_info;

            fastcgi_param    script_FILENAME    $document_root$fastcgi_script_name;

            fastcgi_param    script_NAME    $script;

            try_files $uri =404;

        }


    }


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/226853.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号