Once upon a time, Apache was the de-facto web server solution. Later, Nginx became popular. If you are getting started
with DevOps and Linux system administration, I would recommend you to start with Nginx.
Start With A Static Website
key takeaway is that there is no server side application involved. Install the Nginx web server on your Linux VM.
Configure it to serve a static website. You will need a static website as a per-requisite. Create a static website by
web browser by typing the IP address of the web server in the address bar. Take it to the next level by pointing
the DNS A record of your domain to the VM. For our purposes, a fake domain or a local unregistered domain is
/etc/hosts is also fine. Enjoy viewing the website from the browser.
Host A Dynamic Website
A dynamic website as opposed to a static website, involves an application sitting on the server side. Host a dynamic
web application created using any programming language such as PHP, Ruby, Python, Go, Java, etc. Either you can create
one yourself and or just download and use an open source web application such as WordPress, Drupal, etc. Learn what
is a reverse proxy and how you can leverage it to host dynamic web application. Typically, web applications require a
database server such as MySQL, MariaDB or PostgreSQL. Be prepared for a detour to configure the database server.
Learn, what is HTTPS and how you can use certificates to serve a web application over HTTPS. Learn how to use
the Let’s Encrypt client to obtain a certificate and install it on your web server. Automate the certificate renewals
by writing some shell scripts.
As with any other DevOps project, use IAC to manage the
- Instead of Nginx, use Apach2 webserver
- Implement Basic Auth.
- Play with caching, compression, response codes, redirects, etc
- Learn to use an open source web application written using different programming languages: PHP, Ruby, Python, Java,
Tech Chorus References