Everything I post here are what works for me. I make no promises or guarantees that this will work for you. Always do the research and test. Never try anything on a production server until it has been tested and works as you expect and/or want.
That being said, I have been a web server hobbyist/admin since 2004. Mostly Linux based and geared for Moodle and some WordPress. I have also expanded to working with Indico Conferencing tool.
I post simple step by step tutorials on how to set up servers (VPS or Personal) for web hosting for mostly Moodle or WordPress. I usually include cheatsheets when I can. You can always copy & paste most of the commands and replace user names, passwords, ip addresses, and domain names. Please always follow security protocols to protect yourself and users.