Severity: Notice
Message: Undefined index: HTTP_ACCEPT_LANGUAGE
Filename: front/Model_main.php
Line Number: 35
Backtrace:
			File: /var/www/html/application/models/front/Model_main.php
			Line: 35
			Function: _error_handler			
			File: /var/www/html/application/controllers/Home.php
			Line: 1292
			Function: init			
			File: /var/www/html/index.php
			Line: 315
			Function: require_once			
 
  
  
This article will show you how to Build a Nginx Web Server under Debian 11.
 
Nginx is an open source web server that can be used for a variety of web services, including HTTP servers, reverse proxy servers, mail proxy servers, etc. Nginx was designed to handle the demands of highly concurrent, high-traffic web services.
The term web server has two meanings:
















Step1: Reboot EBOX with internet connected, then enter Debian 11 desktop
$sudo apt update
$sudo apt upgrade
$sudo apt install nginx
$ ps aux | grep nginx
$ pgrep nginx
$ sudo apt install net-tools
$ netstat -tulpn | grep :80

Step2: Test the Nginx Sever
$ ip a


Step3: Configure Nginx Server
In Nginx, all HTML, CSS and Image files are stored by default in the /var/www/html directory, known as the web server's root. The default directory can be modified in the /etc/nginx/sites-enabled/default config file. User can edit it with nano command.
$ sudo nano /etc/nginx/sites-enabled/default
$ sudo nano /etc/nginx/sites-available/dmpdemo
server {
listen 80;
listen [::]:80;
server_name dmpdemo;
root /home/dmp/www;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
	$ sudo ln -s /etc/nginx/sites-available/dmpdemo /etc/nginx/sites-enabled/
$ sudo rm /etc/nginx/sites-enabled/default
$ sudo rm /etc/nginx/sites-enabled/default
$ sudo mkdir ~/www
$ sudo nano ~/www/index.html
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Icop Tech</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to ICOP Tech</h1>
<p>This is a test for Nginx web server.</p>
 
<p><em>Hello world.</em></p>
</body>
</html>
	$ sudo systemctl reload nginx

Enter the IP address to display the web page (~/www/index.html) from the Nginx web server. Web page is now successfully created!
For more info and sample request, please write to info@icop.com.tw, call your nearest ICOP Branch, or contact our Worldwide Official Distributor.