Nginx Debian Configuration Installation10. Nginx is one of the popular web servers among system administrators and web developers. Known for high performance and ability to handle many connections simultaneously, Nginx is often used as a proxy server, a reverse proxy server, and load balancer. This article will discuss the installation and configuration steps of Nginx in the Debian Operating System 10.
Web server is the software that is responsible for handling http requests from clients, such as web browsers, and providing web content in response.
Nginx: Web server developed to handle many connections together with efficient. In addition to being a web server, Nginx can also function as a proxy server and load balancer.
Step 1: Prepare the System
Before starting the installation, make sure that it has entered Super user and then the Debian system is updated with the command:
apt update
apt upgrade
Step 2: Nginx Installation
Use the following command to install nginx:
apt install nginx
Step 3: Starting and Activating Nginx
Start nginx and set it to start automatically every time the system is turned on and check the Nginx status:
systemctl start nginx
systemctl enable nginx
systemctl status nginx
systemctl restart nginx
Step 4: Creating File Index.html at /Home/TJKT/HTML.
Create a file Index.html and create a simple website page:
mkdir /home/tjkt/html
nano /home/tjkt/html/index.html
Step 5: Configuration of Firewall
If you use a firewall (for example, UFW), allow access to port 80 (HTTP) and 443 (https):
ufw allow 'Nginx Full'
ufw enable
Step 6: Connection Test
Open the web browser and access the debian server IP address on Port 80 (http: // address_ip_server). Make sure the Nginx Welcome page appears.
Step 7: Server Block Configuration
Copy the default file in /etc/Nginx/Site-Available/ to the name of the new website for example Tjust. The following configuration command:
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/tjkt
After that edit the contents of the file Tjust it’s active /etc/Nginx/Site-Available/TJKT. As a record of the location of the index.html file, it has not yet been changed with the initial settings. If the place from index.html is in another folder, eating the location of the folder must adjust according to the configuration below. In the location of the location of index.html is in /Home/TJKT/HTML.
nano /etc/nginx/sites-available/tjkt
root /home/tjkt/html;
Step 8: Activate the configuration
Create a symbolic link to the new configuration created in the Sites-Enabled Directory:
ln -s /etc/nginx/sites-available/tjkt /etc/nginx/sites-enabled/
Step 9: Configuration Test and Re -load Nginx
Make sure the configuration is valid:
nginx -t
Re -load nginx:
systemctl restart nginx
Step 10: SSL (Optional) Installation
If you want to activate HTTPS, get an SSL certificate from a certificate provider or use Let’s Encrypt.
Cover:
By following these steps, you now have a Nginx Web server that is installed and configured on the Debian system 10. Adjust the configuration as needed and enjoy the performance and reliability of Nginx as your web server. Thus the Nginx Debian Configuration Installation Guide10.
For the record to disable virtualhost by command Unlink/etc/nginx/site-enabled/tjkt
Also read the article about: Install Zabbix on Ubuntu 20.04
Game Center
Game News
Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime