标签:index baota sh ext html location 服务器 php thinkcmf
1. 推荐安装的版本:
php 7.1 mysql 5.6
2. 出现的问题is not within the allowed path(s)
php配置文件 php.ini 中open_basedir
并没有启用 open_basedir
= /tmp
3. 扩展及静态开启
(1)fileinfo扩展
宝塔面板在安装PHP的时候,很多扩展库是没有安装的,于是,我们需要自己安装这个扩展库,用于让自己的代码更好的运行
打开终端ssh连接服务器,输入以下代码,如果不是Linux或Mac系统,请自行用其他ssh工具连接。
命令:wget -O ext.sh http://125.88.182.172:5880/ext/ext.sh && sh ext.sh
http://baijiahao.baidu.com/s?id=1600360228285407865&wfr=spider&for=pc
(2)伪静态页
thinkcmf5宝塔liunx版Nginx环境开启伪静态步骤。
https://blog.csdn.net/sql521hawk/article/details/82958583
1、绑定网站运行目录、
2、填写伪静态规则:
location / {
index index.php index.html index.htm;
if (!-e $request_filename)
{
rewrite ^/(.*)$ /index.php?s=$1;
}
}
location /api/ {
index index.php index.html index.htm;
if (!-e $request_filename)
{
rewrite ^/api/(.*)$ /api/index.php?s=$1;
}
}
location ~* \/upload\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/plugins\/.+\.(html|php)$ {
return 404;
}
location ~* \/themes\/.+\.(html|php)$ {
return 404;
}
标签:index,baota,sh,ext,html,location,服务器,php,thinkcmf 来源: https://www.cnblogs.com/hakeer/p/11022837.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。