<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # 快速構建&部署 >[info] 此文檔是最簡單快速部署文檔,個性化配置參考 [此文檔](詳細構建和配置.md) ## 一、配置后臺接口和編譯項目 1. 配置后臺接口地址 - 修改`.env.production` ```bash VITE_GLOB_API_URL=/jeecgboot VITE_GLOB_DOMAIN_URL=http://api3.boot.jeecg.com ``` >[warning] 重要提醒:請把`api3.boot.jeecg.com`換成自己的后臺域名。 2. 編譯打包項目 - 進入根目錄 ``` cd jeecgboot-vue3 ``` - 打包編譯 ``` pnpm install pnpm run build ``` - 打包成功 ![](https://img.kancloud.cn/05/13/051340b5cf7649ea33adae5447e771df_486x296.png) ## 二、通過nginx部署前端 通過 nginx 配置請求轉發到后臺接口 >[info] 重要說明: > - `boot3.jeecg.com`是官方Vue3前端演示地址,請把下面的`boot3.jeecg.com` 全部換成自己的前端域名。 > - `/jeecgboot/`對應的是 `步驟一.1`中的參數 `VITE_GLOB_API_URL`,這個可以不改避坑。 ``` upstream boot3.jeecg.com { server 127.0.0.1:80; } server { listen 80; server_name boot3.jeecg.com; #前端打的dist資源存放目錄 root /srv/www/project; location / { # 用于配合 browserHistory使用 try_files $uri $uri/ /index.html; } location /jeecgboot/ { #后臺接口地址(我們部署去掉了/jeecg-boot項目名,如果你有請加上) proxy_pass http://127.0.0.1:8080/; proxy_redirect off; #真實IP獲取 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; set $my_proxy_add_x_forwarded_for $proxy_add_x_forwarded_for; if ($proxy_add_x_forwarded_for ~* "127.0.0.1"){ set $my_proxy_add_x_forwarded_for $remote_addr; } proxy_set_header X-Forwarded-For $my_proxy_add_x_forwarded_for; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } ``` ## 三、前端dist說明 將dist內容,放到服務器的 `/srv/www/project` 目錄下。 `/srv/www/project` 允許自定義,但需要與nginx里面的配置一致。 ![](https://img.kancloud.cn/5e/19/5e19b2a8861f444a4b035b34bf4e154d_360x342.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看