文章 2024-06-24 来自:开发者社区

nginx配置解决vue刷新404、swagger 页面访问(springboot+vue项目)

server { listen 80 default_server; #你的域名 server_name tt.com; #静态文件目录 root /www/wwwroot/www.tt.com; index index.html index.htm; #vue刷新404 location / { try...

文章 2023-01-31 来自:开发者社区

Nginx部署VUE前端页面(图文解说详细版)

如果你还没有安装Nginx,请参考:Linux安装Nginx第一步,打包前端文件npm run build第二步,上传打包好的文件到Nginx的安装目录下的html这里是使用的nginx的默认配置,如果需要自定义存放位置的话,可以去conf文件下的Nginx.conf去配置第三步,自定义配置第四步,配置Nginx代理这里的前端对应的是这样的:后端对应:server.context-path 起到....

Nginx部署VUE前端页面(图文解说详细版)
文章 2022-02-17 来自:开发者社区

Nginx部署Vue解决页面404报错

一、打包项目 1.在项目中的package.json上右键,点击Show npm Scripts*2.打包(或者直接在项目根目录运行 npm run build 命令)*3.成功后会在项目根目录生成dist文件夹 二、压缩并上传项目到服务器(我这里是使用SecureCRT工具进行上传和部署项目的) SecureCRT版本信息如下: 1.压缩文件**2.上传文件**2.1 输入命令rz -y上传(....

Nginx部署Vue解决页面404报错
问答 2022-02-15 来自:开发者社区

在linux上的nginx服务器部署vue项目,只能访问到首页,其他页面404

在本地用npm run build 命令把项目打包,然后把打包项目压缩dist.zip文件上传到服务器上,解压在/usr/local/nginx/(新创建)root/data 下。(打包前仅仅把这修改成./ 了,还有下面build中的也修改了./) 在nginx.config 配置文件修改。 之后启动nginx服务器,可以通过ip/ 重定向到ip/blogs 页面。 但是报错,在...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"部署Nginx并通过Ingress暴露和监控服务","productDescription":"在阿里云容器服务(后简称ACK)集群中通过YAML文件快速部署一个Nginx应用并通过Nginx Ingress暴露和监控服务,结合使用ACK、日志服务、专有网络搭建业务部署运维方案。","productContentLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress"},"productButton2":{"productButtonText":"一键部署","productButtonLink":"https://help.aliyun.com/document_detail/2400022.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"MSE实现全链路灰度","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/iflgbomse","productPromotionInfoSecondText":"云架构必修课:云上高可用架构","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/hablog"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}