I just finished setting up my CMS (programmed in Go) on my dedicated Linux (Ubuntu Server 14.04) server with NGINX as my primary webserver I wish to utilize to serve static content in addition to the Go (and Node.js) http webserver and instead of using their respective fileservers.
Since this is my first experience with Linux, dedicated servers in general and deploying Go applications online, I'd be very interested in hearing your opinions about good conventions to where we store - ideally - all our different websites/webapplications.
By default NGINX uses /usr/share/nginx/ to serve content from. I know it's the easiest thing in the world to change it to whatever we want, but I like to do things right from the beginning.
Right now I store my CMS (Go application) in /home/[myuser]/gocode/src/[projectname]. This is where the go application resides, but it is also there I have the folders, "public" and "media" which I would ideally serve with NGINX.
Since I'd like to be able to switch webservers and host Apache-, NGINX-, etc- applications inside the same overall root location, I now have second doubts about using /var/www or /var/www/html as my root directory. The reason being that apache uses this location by default, and I don't want to serve my application files - only my static files. Others seem to be using /home/user/public_html but that again, wouldn't work well for different webservers and programming languages/platforms.
Do you have any good arguments as to where we would ideally gather/place all our PHP/Apache, Go/NGINX, Node.js, etc. applications?
I tagged this with go and node.js, since go is my primary programming language of choice and most of my applications will be in that language. I do however also want to host my old PHP and Node.js applications - ideally in the same root directory - depending if you have any gold nuggets to share with me regarding how to organize such a multi-platform environment.