|
20 小時之前 | |
---|---|---|
app | 20 小時之前 | |
bootstrap | 4 天之前 | |
config | 4 天之前 | |
database | 4 天之前 | |
lang | 4 天之前 | |
node | 4 天之前 | |
public | 4 天之前 | |
resources | 4 天之前 | |
routes | 21 小時之前 | |
sql | 21 小時之前 | |
tron.php | 4 天之前 | |
.gitignore | 4 天之前 | |
INSTALL.md | 4 天之前 | |
README.md | 3 天之前 | |
api.txt | 4 天之前 | |
apidoc.json | 4 天之前 | |
artisan | 4 天之前 | |
composer.json | 4 天之前 | |
example.env | 4 天之前 | |
package.json | 4 天之前 | |
vite.config.js | 4 天之前 |
项目介绍
git clone http://47.76.126.2:3000/seven/bot-28.git
需要先安装好运行环境,推荐使用宝塔服务器,安装LNMP的架构,建议使用nginx作为服务器,不建议使用apache。需要安装以下软件:
所需环境 | 版本 | 备注 | 推荐版本 |
---|---|---|---|
linux | >= 7.0 | 7.9 | |
nginx | >= 1.17 | 最新的 | |
php | >= 8.0.2 | 8.0.2 ~ 8.2 | 8.2.9 |
mysql | >= 5.7 | 必须要5.7及以上 | 5.7 |
node | >= 22 |
# 安装依赖
composer install
# 创建符号链接
php artisan storage:link
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
# 可根据实际情况进行修改
<IfModule mod_headers.c>
Header set Accept-Ranges bytes
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Header set Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
Header set Access-Control-Allow-Credentials "true"
</IfModule>
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Max-Age' 3600;
if ($request_method = 'OPTIONS') {
# OPTIONS 请求直接返回 200
return 204;
}
#try_files $uri $uri/ /index.php?$query_string;
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
(1) 将 example.env
重命名为 .env
(2) 修改以下配置项
# 以下配置仅为示例
# App
APP_NAME=lovingtalk
APP_DEBUG=false
APP_URL=http://localhost:8080
# 数据库
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bot
DB_USERNAME=root
DB_PASSWORD=123456
DB_PREFIX=bot_
# 电子邮件
MAIL_MAILER=smtp
MAIL_ENCRYPTION=tls
MAIL_PORT=587
MAIL_FROM_NAME="${APP_NAME}"
MAIL_HOST=
MAIL_FROM_ADDRESS=""
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_EXP=600 # 邮件验证码有效期(秒)
序号 | 文件 | 说明 |
---|---|---|
1 | /sql/sql_prod.sql | 初始数据 |
admin
123456
注意:登录后请及时修改管理员密码,防止泄露。