项目配置内容如下:
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 条评论) |