不幸的是,我无法在生产服务器上部署基本的GolangWebApp。在阅读了许多文档和教程后,我明白我需要将GolangWebApp作为守护进程运行。首先要做的事情是:生产服务器是运行Ubuntu16.04的单个IP,带有基于Apache的多个VirtualHosts/etc/apache2/sites-enabled/。Golang环境变量#setgolangenvironmentvarsexportGOROOT=/usr/local/go#setmultiplegopathsseperatedby":"exportGOPATH=/var/www/go_projects/gotest.
不幸的是,我无法在生产服务器上部署基本的GolangWebApp。在阅读了许多文档和教程后,我明白我需要将GolangWebApp作为守护进程运行。首先要做的事情是:生产服务器是运行Ubuntu16.04的单个IP,带有基于Apache的多个VirtualHosts/etc/apache2/sites-enabled/。Golang环境变量#setgolangenvironmentvarsexportGOROOT=/usr/local/go#setmultiplegopathsseperatedby":"exportGOPATH=/var/www/go_projects/gotest.
Iwouldfirstliketofirstsay,thisisnotgoodpracticeandweshouldendevourtohaveeverythingonHTTPS100%ofthetimebutinthiscaseIhadaseriesofawkwardrequirementsonasystemthatdidnotholdsensitiveinformation.IwasquiteignorantofhowHTTPS/TLSworkedwhenaskingthisquestionbackwhenIwasmorejuniorbuthaveleftitinplacetohe
Iwouldfirstliketofirstsay,thisisnotgoodpracticeandweshouldendevourtohaveeverythingonHTTPS100%ofthetimebutinthiscaseIhadaseriesofawkwardrequirementsonasystemthatdidnotholdsensitiveinformation.IwasquiteignorantofhowHTTPS/TLSworkedwhenaskingthisquestionbackwhenIwasmorejuniorbuthaveleftitinplacetohe