Before touching NGINX, you need to master Linux CLI basics, fundamental networking concepts, and the HTTP protocol. In this episode you'll install NGINX, learn service management with systemctl, and get to know the default directory structure.

Welcome to the Learning nginx series! This series will take you on a journey to master NGINX — the most popular web server, reverse proxy, load balancer, and API gateway in the world — from conceptual foundations all the way to enterprise production scale. There are 21 episodes in total, arranged across six phases.
But before we touch any configuration, there are some basic skills and software you must have. Why are pre-requisites important? Because NGINX runs on top of networking infrastructure and the HTTP protocol. If you don't yet understand what an IP address, a port, or a status code is, every directive will feel like a meaningless incantation.
This Episode 0 is your roadmap: making sure you have the basic skills, installing NGINX, learning service management with systemctl, and getting familiar with the default directory structure. Once this episode is done, you'll be able to follow the rest of the series comfortably.
NGINX almost always runs on a Linux server, so you must be comfortable with the terminal. Master directory navigation with cd and ls, reading files with cat, and copying files with cp. Don't forget permission concepts: NGINX configuration is managed by the root user or a user with sudo privileges.
whoami
sudo cat /etc/os-releaseIf both commands above run without errors, your environment is ready for the NGINX installation.
NGINX lives and breathes networking. Understand these three concepts first:
192.168.1.10.example.com to IP addresses through A and CNAME records.Without understanding these three, you'll struggle when configuring server_name and listen in episode 3.
NGINX is an HTTP server, so understand request methods like GET and POST, the range of status codes (2xx success, 3xx redirect, 4xx client error, 5xx server error), and the concept of headers like Host and User-Agent. These concepts are used in nearly every episode of this series.
Debian-based distributions provide NGINX directly from their official repositories:
sudo apt update
sudo apt install nginx -yWhen the process finishes, verify the installed version with nginx -v.
If you're using Rocky Linux, CentOS Stream, or RHEL, use DNF:
sudo dnf install nginx -yOn the RHEL family, NGINX does not start automatically after installation. You need to start the service manually via systemctl.
Want to try it out without touching your server? Run NGINX as a container:
docker run --name nginx-belajar -d -p 8080:80 nginx:alpineThe nginx:alpine image is very lightweight and great for experiments. The NGINX inside it listens on port 80, and you can reach it from the host through port 8080.
NGINX runs as a systemd service:
sudo systemctl enable --now nginx
sudo systemctl status nginx
sudo systemctl reload nginxImportant difference: systemctl reload nginx re-applies the configuration without dropping connections, while systemctl restart nginx briefly drops all connections. For routine configuration changes, always prefer reload.
NGINX has a built-in syntax testing tool. Make it a habit to use it before every reload:
sudo nginx -t
sudo nginx -s reloadThe nginx -t command validates the entire configuration; if the output shows syntax is ok and test is successful, only then is it safe to reload.
After installation, this is the directory map you must memorize:
/etc/nginx/nginx.conf — the main configuration file./etc/nginx/conf.d/ — the include directory for additional configuration./etc/nginx/sites-available/ and /etc/nginx/sites-enabled/ — the typical Ubuntu layout for virtual hosts./var/log/nginx/ — where access logs and error logs live./var/www/html/ — the default document root.ls -la /etc/nginx/
ls /var/log/nginx/
ls /var/www/html/The details of every directory and directive will be broken down starting from episode 2.
Finally, make sure NGINX actually responds to requests:
curl -I http://localhostA good response shows HTTP/1.1 200 OK with a Server: nginx header. If you're using Docker, replace localhost with the published host port. With this, your environment is officially ready for the next 20 episodes.
This Episode 0 has laid the foundation for the entire series: making sure you have Linux CLI, networking, and HTTP skills, installing NGINX on Debian, RHEL, and Docker, mastering service management with systemctl, and memorizing the default directory structure.
Key takeaways:
nginx -t before reloading the configuration./etc/nginx/, /var/log/nginx/, and /var/www/html/.curl -I http://localhost should return 200 OK.In the next episode we'll cover history, core architecture, and why to choose NGINX — from its birth as the answer to the C10K problem, the event-driven non-blocking architecture that keeps it lightweight, to its roles in the modern industry. Make sure your NGINX is up and running, because the Learning nginx journey has only just begun!