请教一下,前端使用npm run build:prod命令,部署在nginx的时候 首页加载不进去,静态文件报404,mode有没改都不行。不知道是少了哪里的修改? export default new Router({ mode: 'hash', // hash模式 scrollBehavior: () => ({ y: 0 }), routes: constantRoutes })...
MoonLight 创建了任务 5年前 MoonLight 将关联仓库设置为若依/RuoYi-Vue 5年前 MoonLight 修改了描述 5年前 MoonLight 修改了标题 5年前 MoonLight 将任务状态从待办的 修改为已完成 5年前 展开全部操作日志 duwei 1年前 后来怎么解决的 登录 后才可以发表评论 状态...
修改vue.config.js中target为http://127.0.0.1,如果不部署在同一台服务器或者使用域名自行修改 打包 npm run build:prod 上传 将打包好的文件(dist目录)上传到服务器,我的上传到了/srv/ruoyi目录,解压并修改名称 unzipdist.zipmvdistweb nginx配置文件修改 使用默认的安装方式,nginx.conf位于/usr/local/nginx/con...
修改vue.config.js中target为http://127.0.0.1,如果不部署在同一台服务器或者使用域名自行修改 打包 npm run build:prod 1. 上传 将打包好的文件(dist目录)上传到服务器,我的上传到了/srv/ruoyi目录,解压并修改名称 unzip dist.zip mv dist web 1. 2. nginx配置文件修改 使用默认的安装方式,nginx.conf位于/...
一、软件安装部署 1. 安装jdk 2. mysql8安装部署 3. redis安装 4. nginx 安装部署 5. Tomcat10 下载和配置 Linux 环境 效果图 6. 克隆项目 gitclonegit@gitee.com:y_project/RuoYi-Vue.git 1. 二、后端项目 2.1. 修改数据库连接 # 进入后端项目目录 ...
Nginx部署前端项目总结--ruoyi的前端vue 项目部署时使用了若依框架,最终部署前段时遇到的问题 1.将前端打包成dist文件夹 解压到服务端,记住该文件夹路径; 2.打开Nginx配置,配置server 点击查看代码 server { listen 80; server_name sjld; location / {
方法二 新增nginx配置进行代理 # 反向代理配置到后端接口 location /prod-api/ { # proxy_set_header Host $proxy_host; 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_forward...
Linux篇.部署vue项目(使用nginx) 1.部署Nginx https://blog.csdn.net/lwf006164/article/details/90553387 2.Vue项目打包 npm run build 3. 将打包后的dist文件夹上传至服务器 4.修改Nginx的conf文件 首先,说一下我遇见的困难。1.请求转发失败?和同事讨论了很久,决定用前缀匹配,匹配成功之后,让nginx帮我们...
nginx 部署子路径问题 前言:翻看过了类似的issue,没有对我这样的问题及解决方案,因为我这个多了一个移动端。以下的文档只对单个PC端管用 问题描述:在同一台服务器上面,需要部署公众号的H5移动端和若依的PC端,要在同一个域名下且都是80端口。那么只有加子路径来解决。
server_name localhost; location /zhangpu { alias html/zhangpu; try_files $uri $uri/ /zhangpu/index.html; index index.html index.htm; } listen 8031; server_name localhost; location /zhangpu { alias html/zhangpu; try_files $uri $uri/ /index.html; ...