DigitalOcean Hosting From the Terminal - Server Config

December 2022

DigitalOcean Hosting From the Terminal - Server Config

In early 2022 I switch my site hosting to DigitalOcean (DO) but on recommendation from colleagues I also set up Forge to do the server management: add sites, deploy from github.com, manage environment variables, etc. An extra service means there's an extra fee but it's worth it because I'm a web developer (I write code) not sys admin.

Recently a client has asked me to look into the set up of an existing site that hosted on DO. Their previous developer doesn't reply to emails anymore and a site needs to change domain names. I'm not at the end of the process yet but here's what I'm learning as I go.

Server Config

Continuing the video above said to set up server config in directory /etc/nginx/sites-available. There was supposed to be a file called default. Just default. The content of that file looked very default and didn't say anything about the sites hosted on the server. In that same area there was another directory called /etc/nginx/sites-enabled and in there were files for each of the domain names hosted on this server. Another step closer!

The end goal of all this is to change a domain name from having a hyphen (this-domain.com) to no hyphen (thisdomain.com). I mostly understand everything in /etc/nginx/sites-enabled/this-domain.com and maybe I can just add more "server" blocks in the file for thisdomain.com. I'm going to try that today. I'm not sure how to terminal install a ssl certificate or if the old one with work with the new domain but one step at a time.

Related

Seeing how ideas and projects connect to one another is an essential skill because it solidifies one's comprehension of that technology.

DigitalOcean Hosting From the Terminal - Finding the Files

DigitalOcean Hosting From the Terminal - Finding the Files

When the previous developer goes M.I.A. I get to learn about DigitalOcean web server management from the terminal.