RuoYi-Cloud 部署篇_04(windows环境 mysql+nginx版本)
生活随笔
收集整理的這篇文章主要介紹了
RuoYi-Cloud 部署篇_04(windows环境 mysql+nginx版本)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 一、nginx 操作流程
- 1. nginx 安裝啟動
- 2. nginx 配置
- 3. nginx 重新啟動
- 二、前端項目編譯
- 2.1. 前端編譯打包
- 2.2. 靜態復制遷移
- 三、后端項目啟動
- 2.1. 我啟動了6個服務
- 2.2. 測試驗證
一、nginx 操作流程
1. nginx 安裝啟動
nginx(windows環境安裝)
2. nginx 配置
worker_processes 1;events {worker_connections 1024; }http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;server {listen 80;server_name localhost;location / {#root /home/ruoyi/projects/ruoyi-ui;root C:/Users/gblfy/Desktop/wfw/data/windows/dist;try_files $uri $uri/ /index.html;index index.html index.htm;}location /stage-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://localhost:8080/;}error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}} }3. nginx 重新啟動
選中nginx服務,鼠標右擊結束任務
二、前端項目編譯
2.1. 前端編譯打包
cd RuoYi-Cloud\ruoyi-ui npm run build:stage2.2. 靜態復制遷移
把編譯后的dist文件夾,復制到剛才nginx配置的路徑
三、后端項目啟動
只啟動核心模塊即可
2.1. 我啟動了6個服務
2.2. 測試驗證
http://localhost
總結
以上是生活随笔為你收集整理的RuoYi-Cloud 部署篇_04(windows环境 mysql+nginx版本)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: vue pdfjs 在线预览
- 下一篇: 移动端 uniapp 国际化一站式解决方