首页 > 作文

ThinkPHP5 Nginx通用配置

更新时间:2023-04-07 07:10:35 阅读: 评论:0

项目配置内容如下:

rver {  上穷碧落  #配置监听端口    listen 80;    listen [::]:80;    #设置网站根目录作为变量root    t $root /园明园var/www/web;    #设置网站根目录    root $root;     #设置访问日志存放路径  心照不宣造句  #access_log logs/access.log;    #设置错误日志存放路径    #error_log  logs/error.log;    #设置网站默认首页    index index.html index.php;    #设置域名           rver_name www.example123.com;    #设置字符集    chart utf-8;    #此配置用于静态文件配置    #location /static {        #try_files $uri $uri/ =404;    #}    #配置php的重写规则    location / {        #开启目录浏览功能        #autoindex on;        #关闭详细文件大小统计,让文件大小显示mb,gb单位,默认为b        #autoindex_exact_size on;        #开启以服务器本地时区显示文件修改日期        #autoindex_localtime on;        if ( !-e $request_filename) {            rewrite ^/(.*)$ /index.php/$1 last;            break;        }     }    #配置php的pathinfo    location ~ .+\.php($|/) {        fastcgi_pass 127.0.0.1:9000;        fastcgi_index index.php;        fastcgi_split_path_info ^((?u).+.php)(/?.+)$;        fastcgi_param path_info $fastcgi_path_info;        fastcgi_param path_translated $document_root$fastcgi_励志语录短句path_info;        fastcgi_param script_filename $root$fastcgi_甘肃师范大学script_name;        include fastcgi_params;    }}

本文发布于:2023-04-07 07:10:33,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/89cc22a0376cdeec9eef44841d414aae.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:ThinkPHP5 Nginx通用配置.doc

本文 PDF 下载地址:ThinkPHP5 Nginx通用配置.pdf

下一篇:返回列表
标签:文件大小   根目录   网站   路径
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图