绑定使用二级域名
# 参考资料
ruoyi-vue Nginx配置二级域名 (opens new window)
解决ruoyi-vue部署到域名子路径静态资源404 (opens new window)
若依前后端分离部署(二级域名+反向代理+负载均衡) (opens new window)
路由地址:
前端:
/esfflow/
后端:
/esfflow/prod-api/
1
2
3
4
2
3
4
# 问题
- 问题1:出现请求后端401
原因:
proxy_pass http://192.168.1.101:8080/;
1
配置的时候忘记了后面的斜杠
有些时候如果nginx不能轻易改动。
则可以修改
esfflowable-admin/src/main/resources/application.yml
# 应用的访问路径
context-path: /esfflow/prod-api
1
2
2
- 问题2:刷新404
RuoYi-Vue 前端分离版:部署在非根目录,刷新后出现404页面 (opens new window)
nginx 配置中,新增一条try_files
location /xxx/ {
#root /home/ruoyi/projects/ruoyi-ui;
alias /home/ruoyi/projects/ruoyi-ui/xxx/;
try_files $uri $uri/ /xxx/index.html;
index index.html index.htm;
}
1
2
3
4
5
6
2
3
4
5
6
原因是默认的时候ScheduleConfig配是注释掉的,所以默认是时候定时任务配置是存在内存的
单机的时候不会有问题,但是集群部署了。就不行了。把这个注解打开就行了,统一配置走数据库。
- 问题4:excel带出时报错:Handler dispatch failed....InvocationTargeException
原因:部署的环境缺少字体库
yum install dejavu-sans-fonts fontconfig -y
1
服务器部署项目,访问验证码出现Handler dispatch failed....InvocationTargeException...异常解决 (opens new window)
上次更新: 2025/04/03, 11:07:08