Nginx (pronounced "engine x") is a popular open-source web server software known for its high performance, scalability, and reliability. It's commonly used as a reverse proxy, load balancer, and HTTP cache, but it can also serve as a standalone web server.
To install Nginx on Debian 12, you can follow these steps:
Step 1 : Connect to your Debian 12 server using an SSH client or access the server's terminal.
Step 2 : Update the package lists to ensure you have the latest information about available packages by running the following command:
Step 3 : Install Nginx by running the following command:
Step 4 : During the installation process, you may be prompted to confirm the installation and enter your sudo password. Type 'Y' and press Enter to proceed.
Step 5 : Once the installation is complete, Nginx will start automatically. You can check the status of the Nginx service by running:
If the service is running, you should see a message indicating that it is active and running.
Step 6 : By default, Nginx starts on boot. If you need to stop, start, or restart the Nginx service manually, you can use the following commands:
- To stop Nginx:
- To start Nginx:
- To restart Nginx:
Step 7 : Once Nginx is installed and running, you can open a web browser and enter your server's IP address or domain name to test if Nginx is working. You should see the default Nginx welcome page if everything is set up correctly.
That's it! Nginx should now be installed and operational on your Debian 12 system.