簡體   English   中英

在我的 apache2 服務器上放置構建的 nodejs 應用程序的位置

[英]Where to put builded nodejs application on my apache2 server

我正在構建我想在我自己的 static ip 服務器(apache2)上部署的項目。 I am using postgresql database and python api (want to use it just as API not frontend), currently I am making frontend where I need to use node packages because I need to download and install OpenLayers for usage with OSM maps, when I build nodejs項目我得到了我需要投入生產的 dist/ 目錄。 我想知道這是否意味着我可以把它放到 /var/www/html 目錄,如果沒有,請問應該把它放在哪里? 或者請解釋一下它是如何工作的:)非常感謝。

如果它是項目的 static 構建,則將/dist目錄放在/var/www/html目錄中很好,但建議您設置一個虛擬主機,以便您可以配置由單個 Apache 實例服務的不同站點(例如,您可以在不同的子域上運行不同的項目)。

有關在 Ubuntu 上設置虛擬主機的信息,請參閱本指南

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM