自从用laravel框架后,好久没用过thinkphp框架了,早期用的3.x系列,想熟悉一下thinkphp5,结果入坑了;
路由配置一直不起作用,总是跳到首页,折腾了好久,后来发现是nginx配置的问题,找了好多文章后来发现官方文档上是有说明的,只是隐藏得比较深,没注意看;加上加粗部分的配置就好了
server {
listen 80;
server_name www.hu-rong.com;
location / {
root /share/tp5_app/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
#pathinfo支持
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /share/tp5_app/public$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
- 相关文章
- windows下使用MongoDB Compass Com
- Oracle VM VirtualBox中设置共享文
- linux安装openvpn并保存密码
- deepin v20深度系统安装docker及do
- 域名在阿里云服务器换成腾讯云后备
- windows下安装VirtualBox增强工具
- 国内访问github慢或打不开的解决方
- linux下安装phpstorm2018及激活码
- vmware中虚拟机上不了网及共享文件
- linux版phpstorm2020.3.3及激活码
- 热门文章
- win7中将文件拷贝到虚拟机linux下
- phpexcel设置行高及列宽,背景颜色,
- rabbitmq无法启动
- intellij idea不显示git push按钮
- php7中使用mongodb的aggregate进行
- laravel页面静态化的方法
- centos7.4 64位下swoole安装及配置
- navicate连接mycat报1184错误
- curl设置超时不起作用(CURLOPT_TIM
- devops-jenkins容器为pending状态
- 好评文章
- phpexcel设置行高及列宽,背景颜色,
- php7中使用mongodb的aggregate进行
- intellij idea打开文件所在文件夹
- windows下使用MongoDB Compass Com
- win7中将文件拷贝到虚拟机linux下
- laravel 中悲观锁 & 乐观锁的使用
- 单点登录sso原理及php实现方式及de
- navicate连接mycat报1184错误
- rabbitmq无法启动
- laravel整合dingo/api方法步骤:jwt
- 我的项目
- 【github】www.github.com/hurong241
- 【码云】gitee.com/hu_rong/projects
- 【docker hub】hub.docker.com/repositories/hurong241
- 【packagist】packagist.org/users/hurong241/packages
- 站点信息
- 建站时间:2011年
- 文章数:623篇
- 浏览数:1303109