网站首页 > 技术文章 正文
需要部署 若依RuoYi-Vue前后端分离的后台管理系统时,后端正常,但是前端保存。
若依的地址:https://doc.ruoyi.vip/ruoyi-vue/
前端需要nginx,在windows10系统上,nginx部署运行正常。
但是RuoYi-Vue前端部署在端口7079,运行报错。
nginx保存信息的log文件内容如下:
uoyi-ui/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:7079", referrer: "http://127.0.0.1:7079/"
2025/03/28 12:34:23 [crit] 9428#11860: *5 GetFileAttributesEx() "E: emp
uoyi-ui/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET /index HTTP/1.1", host: "127.0.0.1:7079"
2025/03/28 12:46:04 [crit] 9428#11860: *9 GetFileAttributesEx() "E: emp
uoyi-ui/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET /index HTTP/1.1", host: "127.0.0.1:7079"
2025/03/28 12:46:04 [crit] 9428#11860: *9 GetFileAttributesEx() "E: emp
uoyi-ui/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET /index HTTP/1.1", host: "127.0.0.1:7079"
2025/03/28 12:46:04 [crit] 9428#11860: *9 GetFileAttributesEx() "E: emp
uoyi-ui/index.html" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET /index HTTP/1.1", host: "127.0.0.1:7079"
2025/03/28 12:46:04 [error] 9428#11860: *9 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 127.0.0.1, server: localhost, request: "GET /index HTTP/1.1", host: "127.0.0.1:7079"
经分析,是windows下的nginx的配置信息存在错误,关键信息如下:
server {
listen 7079;
server_name localhost;
charset utf-8;
location / {
root E:\temp\ruoyi-ui;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /prod-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8081/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
里面的目录E:\temp\ruoyi-ui
就是前端部署文件,经分析,应采用正斜杠/,也就是正确的应该是:
E:/temp/ruoyi-ui
修改nginx配置后,正常运行如下:
猜你喜欢
- 2025-05-25 【AI图鉴】 LangChain-Chatchat 开源、可离线部署大模型知识库项目
- 2025-05-25 DeepSeek 挤爆了!教你3步部署个本地版本,包括前端界面
- 2025-05-25 RuoYi若依框架 前端 部署[具体步骤]
- 2025-05-25 Nginx前端部署
- 2024-09-24 教育平台项目前端:项目前后端接口联调,项目上线部署发布
- 2024-09-24 前端工程化体系设计与实践第5章部署第2节前端静态资源资源策略
- 2024-09-24 docker入门,让部署再容易些
- 2024-09-24 有遇到部署服务器后刷新404问题吗?
- 2024-09-24 vue/react项目中不可忽视的自动化部署方案
- 2024-09-24 从购买云服务器到整个web应用部署过程
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 前端设计模式 (75)
- 前端性能优化 (51)
- 前端模板 (66)
- 前端跨域 (52)
- 前端缓存 (63)
- 前端react (48)
- 前端aes加密 (58)
- 前端md5加密 (49)
- 前端路由 (55)
- 前端数组 (65)
- 前端定时器 (47)
- 前端接口 (46)
- Oracle RAC (73)
- oracle恢复 (76)
- oracle 删除表 (48)
- oracle 用户名 (74)
- oracle 工具 (55)
- oracle 内存 (50)
- oracle 导出表 (57)
- oracle 中文 (51)
- oracle链接 (47)
- oracle的函数 (57)
- mac oracle (47)
- 前端调试 (52)
- 前端登录页面 (48)
本文暂时没有评论,来添加一个吧(●'◡'●)