From 819126da8f83d17bef31e213ccbaaa25cd03c982 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:13:19 +0530
Subject: [PATCH 01/23] folder created
---
learning/dashboard/{ => webserver}/readme.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename learning/dashboard/{ => webserver}/readme.md (100%)
diff --git a/learning/dashboard/readme.md b/learning/dashboard/webserver/readme.md
similarity index 100%
rename from learning/dashboard/readme.md
rename to learning/dashboard/webserver/readme.md
From 01db13f5952199883167fee2fa29dd1ac22805b4 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:15:19 +0530
Subject: [PATCH 02/23] changes done
---
learning/dashboard/readme.md | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 learning/dashboard/readme.md
diff --git a/learning/dashboard/readme.md b/learning/dashboard/readme.md
new file mode 100644
index 00000000..e7dd834c
--- /dev/null
+++ b/learning/dashboard/readme.md
@@ -0,0 +1,3 @@
+## This directory is the placeholder for all Dashboard and frontend related learnings
+
+### Please use this directory to raise PRs for the learning issues created.
From 97ab14ed4870abfe35fce45bed08aba5f6c8c2bf Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:19:11 +0530
Subject: [PATCH 03/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 53 +++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 2 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index e7dd834c..7f5bb60e 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -1,3 +1,52 @@
-## This directory is the placeholder for all Dashboard and frontend related learnings
+# What is a web server?
-### Please use this directory to raise PRs for the learning issues created.
+
+The Hyper Text Transfer Protocol (HTTP) and other protocols are used by the web server, a piece of hardware and software, to accept and process requests from clients all over the world. The web server displays contents by storing them, then gives users access to the webpages via text, images, videos, and other media. It employs
+Physical Storage: To ensure the security of website data, all data is kept on a physical web server. A request is created and sent to the web server to process the data when an end user types the URL of your website into their browser or searches for it using a keyword.
+Finding the web server on which to host a website is the responsibility of web browsers like Firefox, Chrome, or Internet Explorer.
+## Use of a web server:-
+A web server is primarily used to deliver and display website content to users or clients. The following are additional applications for web servers:
+• Store and safeguard website data: A web server has the capacity to store and safeguard sensitive website data from unauthorised users.
+• Manage bandwidth to control network traffic: A web server can assist in removing downtime brought on by heavy web traffic. In order to control the rate of data transmission over the internet and reduce unnecessary network traffic, web hosts can configure bandwidth.
+• Server-side web scripting: This feature enables users to use scripting languages like Ruby, Python, and PHP to create dynamic web pages.
+• Virtual hosting: In order to run multiple applications, websites, and data, web servers can also be used as virtual servers.
+
+## Why do we need web servers?
+
+The purpose of a web server is to store, process, and provide to users any requested data or webpages.
+Requests for static material (such as HTML pages, files, pictures, and videos) from a website are accepted by and handled by a web server.Just HTTP requests and answers are handled by web servers.
+
+## What are the different web servers available ?
+
+There are mainly 5 Types of Web Servers:
+• Apache
+• Nginx
+• Microsoft IIS
+• Lighttpd
+• Jigsaw
+
+
+**Apache :**
+
+The most extensively used and well-liked web server globally is Apache. The Apache Foundation creates and maintains it as open-source software. Since Apache is renowned for its dependability, adaptability, and efficiency, it is frequently used to host websites of all sizes. With a large selection of modules and plugins available to increase its functionality, it is also extremely customisable.
+Apache can be used to host dynamic material, such as websites created with server-side programming languages like PHP, in addition to delivering static content, such HTML pages and photos. Moreover, it is capable of acting as a reverse proxy server, which routes requests received from the internet to one or more backend servers.
+
+**Nginx :**
+
+Another well-liked open-source web server, Nginx, is renowned for both its great performance and minimal resource use. It can also be used to cache static information for quicker delivery to consumers. It is frequently used as a reverse proxy server, diverting traffic to other servers and services. High traffic websites are frequently hosted by Nginx, which is frequently used with Apache to distribute the load between the two servers.
+The capacity of Nginx to effectively handle a large number of concurrent connections is one of its important characteristics. It can handle requests asynchronously and has an event-driven architecture, making it well-suited to handle heavy traffic levels.
+**
+Microsoft IIS :**
+
+A proprietary web server created by Microsoft for use with the Windows operating system is called IIS (Internet Information Services). With support for many different web technologies and protocols, it is a strong and feature-rich web server. Enterprise environments frequently employ IIS, which is connected with other Microsoft goods like Active Directory and Exchange.
+Static web pages, dynamic web pages, and web-based apps can all be hosted on IIS, a powerful and expandable web server. It may be customised with a range of modules and extensions to add new features and capabilities. It supports a variety of programming languages, including ASP.NET, PHP, and Python.
+
+**Lighttpd :**
+
+A free and open-source web server called Lighttpd was created to be small, quick, and effective. Because it is built in C and has a small memory footprint, it is a viable option for hosting busy websites on servers with limited resources.
+One of Lighttpd's primary characteristics is its modular architecture, which enables users to quickly alter and expand the server's capabilities. FastCGI, URL rewriting and server-side programming languages like PHP and Ruby are just a few of the features it provides. Moreover, it can be set up to operate with external authentication modules and includes built-in support for SSL/TLS.
+
+**Jigsaw :**
+
+The World Wide Web Consortium (W3C) created the web server Jigsaw as a reference implementation of the HTTP/1.1 protocol. For programmers curious about HTTP protocols and web server technology, Jigsaw is still a popular option.
+Jigsaw's modular design, which enables customers to easily adapt and increase the server's capability, is one of its primary benefits. CGI, server-side programming languages like PHP and Python, and SSL/TLS encryption are just a few of the features it provides. Moreover, it includes built-in support for virtual hosting, which enables the hosting of numerous websites on a single server.
From 2183d876ebf15f65e09547c902d96b451b77e13e Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:21:18 +0530
Subject: [PATCH 04/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 7f5bb60e..151eb77e 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -50,3 +50,5 @@ One of Lighttpd's primary characteristics is its modular architecture, which ena
The World Wide Web Consortium (W3C) created the web server Jigsaw as a reference implementation of the HTTP/1.1 protocol. For programmers curious about HTTP protocols and web server technology, Jigsaw is still a popular option.
Jigsaw's modular design, which enables customers to easily adapt and increase the server's capability, is one of its primary benefits. CGI, server-side programming languages like PHP and Python, and SSL/TLS encryption are just a few of the features it provides. Moreover, it includes built-in support for virtual hosting, which enables the hosting of numerous websites on a single server.
+
+
From 276dfeb6892e3516e1083167e1e8fe68c7eead56 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:22:31 +0530
Subject: [PATCH 05/23] Create readme.md
---
learning/dashboard/webserver/readme.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 151eb77e..7f5bb60e 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -50,5 +50,3 @@ One of Lighttpd's primary characteristics is its modular architecture, which ena
The World Wide Web Consortium (W3C) created the web server Jigsaw as a reference implementation of the HTTP/1.1 protocol. For programmers curious about HTTP protocols and web server technology, Jigsaw is still a popular option.
Jigsaw's modular design, which enables customers to easily adapt and increase the server's capability, is one of its primary benefits. CGI, server-side programming languages like PHP and Python, and SSL/TLS encryption are just a few of the features it provides. Moreover, it includes built-in support for virtual hosting, which enables the hosting of numerous websites on a single server.
-
-
From e1122a3ee0b17e3bd3c3f6ec4d08a892d532c050 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 15:25:37 +0530
Subject: [PATCH 06/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 7f5bb60e..7a3894bf 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -11,12 +11,12 @@ A web server is primarily used to deliver and display website content to users o
• Server-side web scripting: This feature enables users to use scripting languages like Ruby, Python, and PHP to create dynamic web pages.
• Virtual hosting: In order to run multiple applications, websites, and data, web servers can also be used as virtual servers.
-## Why do we need web servers?
+# Why do we need web servers?
The purpose of a web server is to store, process, and provide to users any requested data or webpages.
Requests for static material (such as HTML pages, files, pictures, and videos) from a website are accepted by and handled by a web server.Just HTTP requests and answers are handled by web servers.
-## What are the different web servers available ?
+# What are the different web servers available ?
There are mainly 5 Types of Web Servers:
• Apache
@@ -35,8 +35,8 @@ Apache can be used to host dynamic material, such as websites created with serve
Another well-liked open-source web server, Nginx, is renowned for both its great performance and minimal resource use. It can also be used to cache static information for quicker delivery to consumers. It is frequently used as a reverse proxy server, diverting traffic to other servers and services. High traffic websites are frequently hosted by Nginx, which is frequently used with Apache to distribute the load between the two servers.
The capacity of Nginx to effectively handle a large number of concurrent connections is one of its important characteristics. It can handle requests asynchronously and has an event-driven architecture, making it well-suited to handle heavy traffic levels.
-**
-Microsoft IIS :**
+
+**Microsoft IIS :**
A proprietary web server created by Microsoft for use with the Windows operating system is called IIS (Internet Information Services). With support for many different web technologies and protocols, it is a strong and feature-rich web server. Enterprise environments frequently employ IIS, which is connected with other Microsoft goods like Active Directory and Exchange.
Static web pages, dynamic web pages, and web-based apps can all be hosted on IIS, a powerful and expandable web server. It may be customised with a range of modules and extensions to add new features and capabilities. It supports a variety of programming languages, including ASP.NET, PHP, and Python.
From d7ce67d11d9c0abc427c4ae9229289bf47174685 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 31 Mar 2023 19:26:50 +0530
Subject: [PATCH 07/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 7a3894bf..377638ae 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -11,13 +11,17 @@ A web server is primarily used to deliver and display website content to users o
• Server-side web scripting: This feature enables users to use scripting languages like Ruby, Python, and PHP to create dynamic web pages.
• Virtual hosting: In order to run multiple applications, websites, and data, web servers can also be used as virtual servers.
+
# Why do we need web servers?
+
The purpose of a web server is to store, process, and provide to users any requested data or webpages.
Requests for static material (such as HTML pages, files, pictures, and videos) from a website are accepted by and handled by a web server.Just HTTP requests and answers are handled by web servers.
+
# What are the different web servers available ?
+
There are mainly 5 Types of Web Servers:
• Apache
• Nginx
From 6cf8979fd49ab71448fbe1117528c8df057069a4 Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Fri, 31 Mar 2023 19:37:40 +0530
Subject: [PATCH 08/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 105 +++++++++++++++++++++++++
1 file changed, 105 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 377638ae..1edd653f 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -54,3 +54,108 @@ One of Lighttpd's primary characteristics is its modular architecture, which ena
The World Wide Web Consortium (W3C) created the web server Jigsaw as a reference implementation of the HTTP/1.1 protocol. For programmers curious about HTTP protocols and web server technology, Jigsaw is still a popular option.
Jigsaw's modular design, which enables customers to easily adapt and increase the server's capability, is one of its primary benefits. CGI, server-side programming languages like PHP and Python, and SSL/TLS encryption are just a few of the features it provides. Moreover, it includes built-in support for virtual hosting, which enables the hosting of numerous websites on a single server.
+
+# How to setup and configure Nginx ?
+
+## Nginx installation on Ubuntu 20.04
+
+A package manager is typically included with every operating system. You have a choice between using apt or apt-get with Ubuntu 20.04. As this is a new server, you first need to update the package manager.
+
+Step 1 : Upgrade the package management to the most recent version that is compatible:
+You can either use the apt or apt-get package manager to install Nginx.
+sudo apt updatesudo apt-get update
+Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
+
+Step 2 : Install Ngnix web server using apt:
+sudo apt install nginxsudo apt-get install nginx
+
+Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
+
+## Configure Firewall for Nginx :
+
+The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
+
+Step 1: Install ufw:
+sudo apt install ufw
+
+Step 2: Check if ufw is working fine:
+sudo ufw status
+
+Step 3: Allow traffic over HTTP and recheck the status:
+sudo ufw allow ‘Nginx HTTP’
+
+Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
+sudo ufw allow ‘OpenSSH’
+
+Step 5: If the status was inactive when you checked earlier, activate it:
+sudo ufw enable
+
+The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
+
+##Nginx Installation and Management :
+
+Step 1: Check the status of the Nginx server:
+ sudo systemctl status nginx
+
+Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
+ http://servermania_server_ip
+
+Step 3: Use systemctl to start, stop, or restart your Nginx server:
+sudo systemctl stop nginxsudo systemctl start nginxsudo systemctl restart nginx
+
+Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
+ systemctl reload nginx # reloads Nginx configuration
+
+Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
+
+## Configure Server Blocks
+
+Similar capability is offered by server blocks and the virtual hosts of Apache Web Server. The most widely utilised server in the LAMP Stack is Apache Web Server. See How to Easily Install Your Own Server for instructions on installing the LAMP stack on ServerMania servers.
+
+You can use more than one domain with your Nginx server thanks to Nginx server blocks. The steps below must be followed in order to set up two domains, domainone.com and domaintwo.com, on the same Nginx server:
+
+Create a directory, one for each domain:
+
+Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
+
+sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
+
+Step 1: Change ownership of the directories:
+Doing this will enable the user to create and edit the contents of these new directories.
+sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html
+
+Step 2: Modify permissions for both the domain directories:
+This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
+sudo chmod -R 755 /var/www
+
+Step 3: Create sample web pages for each domain/site:
+Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
+nano /var/www/domainone.com/html/index.html
+Once the editor is open, paste the following into the editor:
+
Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
+Save the index.html file and create a similar one for the second domain. Make sure you change the welcome message.
+
+Step 4: Create Server Blocks:
+As mentioned earlier, by default, Nginx has only one server block. You can find it here — /etc/nginx/sites-available/default. So, we'll need two server blocks because we have two sites to support. The server restricts access to port 80. For our new server blocks, let's replicate the default server block.
+sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
+Similarly, copy the default file and create the second server block too.
+
+Step 5: Mark One of the Two Servers as Default:
+You can only have a single default server with the default_server option enabled. Please remove it from one of the server blocks.
+
+Step 6: Enable Server Blocks & Restart Nginx:
+You can enable the server blocks by creating symbolic links from the server block configuration files to the sites-enabled directory.
+sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
+
+Nginx will begin handling requests for both domains from the appropriate blocks that are received on port 80 as soon as you create symbolic links for both domains and restart Nginx.
+
+You can try visiting both domains to test the modifications and check to see if the contents of index.html are rendered correctly.
+The installation of Nginx on Ubuntu 20.04 can now begin.
+
+
+
+
+
+
+
+
From d88d4c6c04b3e557bee2a270be3a24d8e0fb76fb Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Fri, 7 Apr 2023 22:59:19 +0530
Subject: [PATCH 09/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 30 +++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 1edd653f..0f174a1f 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -63,11 +63,11 @@ A package manager is typically included with every operating system. You have a
Step 1 : Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
-sudo apt updatesudo apt-get update
+'''sudo apt updatesudo apt-get update'''
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
Step 2 : Install Ngnix web server using apt:
-sudo apt install nginxsudo apt-get install nginx
+'''sudo apt install nginxsudo apt-get install nginx'''
Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
@@ -76,35 +76,35 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-sudo apt install ufw
+'''sudo apt install ufw'''
Step 2: Check if ufw is working fine:
-sudo ufw status
+'''sudo ufw status'''
Step 3: Allow traffic over HTTP and recheck the status:
-sudo ufw allow ‘Nginx HTTP’
+'''sudo ufw allow ‘Nginx HTTP’ '''
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-sudo ufw allow ‘OpenSSH’
+'''sudo ufw allow ‘OpenSSH’ '''
Step 5: If the status was inactive when you checked earlier, activate it:
-sudo ufw enable
+'''sudo ufw enable'''
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
-##Nginx Installation and Management :
+## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
- sudo systemctl status nginx
+ ''' sudo systemctl status nginx '''
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
http://servermania_server_ip
Step 3: Use systemctl to start, stop, or restart your Nginx server:
-sudo systemctl stop nginxsudo systemctl start nginxsudo systemctl restart nginx
-
+'''sudo systemctl stop nginxsudo systemctl start nginxsudo systemctl restart nginx'''
+my
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
- systemctl reload nginx # reloads Nginx configuration
+ '''systemctl reload nginx # reloads Nginx configuration'''
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -118,15 +118,15 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
+'''sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html'''
Step 1: Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
-sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html
+'''sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html'''
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-sudo chmod -R 755 /var/www
+'''sudo chmod -R 755 /var/www'''
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
From abaab6013cb6c2ce67c568f205900a1b6b0934c0 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Wed, 12 Apr 2023 22:34:22 +0530
Subject: [PATCH 10/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 0f174a1f..f5d54c07 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -76,35 +76,36 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-'''sudo apt install ufw'''
+```sudo apt install ufw```
Step 2: Check if ufw is working fine:
-'''sudo ufw status'''
+```sudo ufw status```
Step 3: Allow traffic over HTTP and recheck the status:
-'''sudo ufw allow ‘Nginx HTTP’ '''
+```sudo ufw allow ‘Nginx HTTP’ ```
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-'''sudo ufw allow ‘OpenSSH’ '''
+```sudo ufw allow ‘OpenSSH’ ```
Step 5: If the status was inactive when you checked earlier, activate it:
-'''sudo ufw enable'''
+```sudo ufw enable```
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
- ''' sudo systemctl status nginx '''
+ ``` sudo systemctl status nginx ```
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
http://servermania_server_ip
Step 3: Use systemctl to start, stop, or restart your Nginx server:
-'''sudo systemctl stop nginxsudo systemctl start nginxsudo systemctl restart nginx'''
-my
+```sudo systemctl stop nginxsudo systemctl start```
+ ``` nginxsudo systemctl restart nginx```
+
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
- '''systemctl reload nginx # reloads Nginx configuration'''
+ ```systemctl reload nginx # reloads Nginx configuration```
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -118,15 +119,15 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-'''sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html'''
+```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html```
Step 1: Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
-'''sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html'''
+```sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html```
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-'''sudo chmod -R 755 /var/www'''
+```sudo chmod -R 755 /var/www```
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
From 634a45c4cd59502d9db73b7467e5dfce04d7f79f Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sat, 15 Apr 2023 12:17:28 +0530
Subject: [PATCH 11/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index f5d54c07..592317f0 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -154,7 +154,11 @@ You can try visiting both domains to test the modifications and check to see if
The installation of Nginx on Ubuntu 20.04 can now begin.
+##Reference
+https://www.techtarget.com/whatis/definition/Web-server#:~:text=A%20web%20server%20is%20software,and%20delivering%20webpages%20to%20users.
+
+https://www.solarwinds.com/resources/it-glossary/web-server#:~:text=servers%20used%20for%3F-,What%20are%20web%20servers%20used%20for%3F,website%20data%20from%20unauthorized%20users.
From 60b90f407c2b1b59580d169f89ea571427c52f74 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sat, 15 Apr 2023 12:18:42 +0530
Subject: [PATCH 12/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 592317f0..1700a910 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -154,7 +154,7 @@ You can try visiting both domains to test the modifications and check to see if
The installation of Nginx on Ubuntu 20.04 can now begin.
-##Reference
+#Reference
https://www.techtarget.com/whatis/definition/Web-server#:~:text=A%20web%20server%20is%20software,and%20delivering%20webpages%20to%20users.
From 19d91fe06b4231fb362fcfa62f2d91a80b82910b Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sat, 15 Apr 2023 12:19:56 +0530
Subject: [PATCH 13/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 1700a910..90dd55c3 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -154,7 +154,7 @@ You can try visiting both domains to test the modifications and check to see if
The installation of Nginx on Ubuntu 20.04 can now begin.
-#Reference
+# Reference
https://www.techtarget.com/whatis/definition/Web-server#:~:text=A%20web%20server%20is%20software,and%20delivering%20webpages%20to%20users.
From 6dcae162ff798ccb03ec716ebf8dc1ac5075b488 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sat, 15 Apr 2023 12:24:35 +0530
Subject: [PATCH 14/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 90dd55c3..6d374c18 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -160,6 +160,8 @@ https://www.techtarget.com/whatis/definition/Web-server#:~:text=A%20web%20server
https://www.solarwinds.com/resources/it-glossary/web-server#:~:text=servers%20used%20for%3F-,What%20are%20web%20servers%20used%20for%3F,website%20data%20from%20unauthorized%20users.
+https://ubuntu.com/tutorials/install-and-configure-nginx#2-installing-nginx
+
From 46f5380dba9227ef7a7eefd5d555406a21ae9d02 Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sun, 16 Apr 2023 13:17:57 +0530
Subject: [PATCH 15/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 33 ++++++++++----------------
1 file changed, 13 insertions(+), 20 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 6d374c18..e3f768fc 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -63,11 +63,11 @@ A package manager is typically included with every operating system. You have a
Step 1 : Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
-'''sudo apt updatesudo apt-get update'''
+sudo apt updatesudo apt-get update
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
Step 2 : Install Ngnix web server using apt:
-'''sudo apt install nginxsudo apt-get install nginx'''
+sudo apt install nginxsudo apt-get install nginx
Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
@@ -76,36 +76,36 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-```sudo apt install ufw```
+sudo apt install ufw
Step 2: Check if ufw is working fine:
-```sudo ufw status```
+sudo ufw status
Step 3: Allow traffic over HTTP and recheck the status:
-```sudo ufw allow ‘Nginx HTTP’ ```
+sudo ufw allow ‘Nginx HTTP’
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-```sudo ufw allow ‘OpenSSH’ ```
+sudo ufw allow ‘OpenSSH’
Step 5: If the status was inactive when you checked earlier, activate it:
-```sudo ufw enable```
+sudo ufw enable
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
- ``` sudo systemctl status nginx ```
+ sudo systemctl status nginx
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
http://servermania_server_ip
Step 3: Use systemctl to start, stop, or restart your Nginx server:
-```sudo systemctl stop nginxsudo systemctl start```
- ``` nginxsudo systemctl restart nginx```
+sudo systemctl stop nginxsudo systemctl start
+ nginxsudo systemctl restart nginx
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
- ```systemctl reload nginx # reloads Nginx configuration```
+ systemctl reload nginx # reloads Nginx configuration
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -119,15 +119,14 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html```
+sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
Step 1: Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
-```sudo chown -R $user:$user /var/www/domainone.com/htmlsudo chown -R $user:$user /var/www/domaintwo.com/html```
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-```sudo chmod -R 755 /var/www```
+sudo chmod -R 755 /var/www
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
@@ -154,13 +153,7 @@ You can try visiting both domains to test the modifications and check to see if
The installation of Nginx on Ubuntu 20.04 can now begin.
-# Reference
-https://www.techtarget.com/whatis/definition/Web-server#:~:text=A%20web%20server%20is%20software,and%20delivering%20webpages%20to%20users.
-
-https://www.solarwinds.com/resources/it-glossary/web-server#:~:text=servers%20used%20for%3F-,What%20are%20web%20servers%20used%20for%3F,website%20data%20from%20unauthorized%20users.
-
-https://ubuntu.com/tutorials/install-and-configure-nginx#2-installing-nginx
From a826a4d26d6bfb746925f8d23e8a063d648a312d Mon Sep 17 00:00:00 2001
From: Aysha Nimra <123230171+ayshanimra@users.noreply.github.com>
Date: Sun, 16 Apr 2023 13:19:14 +0530
Subject: [PATCH 16/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index e3f768fc..c78e2b72 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -63,11 +63,11 @@ A package manager is typically included with every operating system. You have a
Step 1 : Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
-sudo apt updatesudo apt-get update
+```sudo apt updatesudo apt-get update```
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
Step 2 : Install Ngnix web server using apt:
-sudo apt install nginxsudo apt-get install nginx
+```sudo apt install nginxsudo apt-get install nginx```
Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
@@ -76,7 +76,7 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-sudo apt install ufw
+```sudo apt install ufw```
Step 2: Check if ufw is working fine:
sudo ufw status
From a605ff828a2ded4eb1c7a224e1ec33dbd91ff06f Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Sun, 16 Apr 2023 13:31:07 +0530
Subject: [PATCH 17/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 30 +++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index c78e2b72..88e77559 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -79,33 +79,33 @@ Step 1: Install ufw:
```sudo apt install ufw```
Step 2: Check if ufw is working fine:
-sudo ufw status
+```sudo ufw status```
Step 3: Allow traffic over HTTP and recheck the status:
-sudo ufw allow ‘Nginx HTTP’
+```sudo ufw allow ‘Nginx HTTP’ ```
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-sudo ufw allow ‘OpenSSH’
+```sudo ufw allow ‘OpenSSH’```
Step 5: If the status was inactive when you checked earlier, activate it:
-sudo ufw enable
+```sudo ufw enable```
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
- sudo systemctl status nginx
+```sudo systemctl status nginx```
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
- http://servermania_server_ip
+http://servermania_server_ip
Step 3: Use systemctl to start, stop, or restart your Nginx server:
-sudo systemctl stop nginxsudo systemctl start
+```sudo systemctl stop nginxsudo systemctl start
nginxsudo systemctl restart nginx
-
+```
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
- systemctl reload nginx # reloads Nginx configuration
+```systemctl reload nginx # reloads Nginx configuration```
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -119,25 +119,25 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
+```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html```
Step 1: Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-sudo chmod -R 755 /var/www
+```sudo chmod -R 755 /var/www```
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
-nano /var/www/domainone.com/html/index.html
+```nano /var/www/domainone.com/html/index.html```
Once the editor is open, paste the following into the editor:
- Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
+``` Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
```
Save the index.html file and create a similar one for the second domain. Make sure you change the welcome message.
Step 4: Create Server Blocks:
As mentioned earlier, by default, Nginx has only one server block. You can find it here — /etc/nginx/sites-available/default. So, we'll need two server blocks because we have two sites to support. The server restricts access to port 80. For our new server blocks, let's replicate the default server block.
-sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
+```sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com```
Similarly, copy the default file and create the second server block too.
Step 5: Mark One of the Two Servers as Default:
@@ -145,7 +145,7 @@ You can only have a single default server with the default_server option enabled
Step 6: Enable Server Blocks & Restart Nginx:
You can enable the server blocks by creating symbolic links from the server block configuration files to the sites-enabled directory.
-sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
+```sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/```
Nginx will begin handling requests for both domains from the appropriate blocks that are received on port 80 as soon as you create symbolic links for both domains and restart Nginx.
From 1c0e5dba721ff017722dfd58f30405275053453c Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Sun, 16 Apr 2023 13:36:15 +0530
Subject: [PATCH 18/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 50 +++++++++++++++++---------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 88e77559..146c3ba5 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -63,11 +63,13 @@ A package manager is typically included with every operating system. You have a
Step 1 : Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
-```sudo apt updatesudo apt-get update```
+```sudo apt updatesudo apt-get update
+```
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
Step 2 : Install Ngnix web server using apt:
-```sudo apt install nginxsudo apt-get install nginx```
+```sudo apt install nginxsudo apt-get install nginx
+```
Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
@@ -76,36 +78,44 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-```sudo apt install ufw```
+```sudo apt install ufw
+```
Step 2: Check if ufw is working fine:
-```sudo ufw status```
+```sudo ufw status
+```
Step 3: Allow traffic over HTTP and recheck the status:
-```sudo ufw allow ‘Nginx HTTP’ ```
+```sudo ufw allow ‘Nginx HTTP’
+```
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-```sudo ufw allow ‘OpenSSH’```
+```sudo ufw allow ‘OpenSSH’
+```
Step 5: If the status was inactive when you checked earlier, activate it:
-```sudo ufw enable```
+```sudo ufw enable
+```
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
-```sudo systemctl status nginx```
+```sudo systemctl status nginx
+```
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
-http://servermania_server_ip
+```http://servermania_server_ip
+```
Step 3: Use systemctl to start, stop, or restart your Nginx server:
```sudo systemctl stop nginxsudo systemctl start
- nginxsudo systemctl restart nginx
+ nginxsudo systemctl restart nginx
```
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
-```systemctl reload nginx # reloads Nginx configuration```
+```systemctl reload nginx # reloads Nginx configuration
+```
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -119,25 +129,30 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html```
+```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
+```
Step 1: Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-```sudo chmod -R 755 /var/www```
+```sudo chmod -R 755 /var/www
+```
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
-```nano /var/www/domainone.com/html/index.html```
+```nano /var/www/domainone.com/html/index.html
+```
Once the editor is open, paste the following into the editor:
-``` Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
```
+``` Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
+```
Save the index.html file and create a similar one for the second domain. Make sure you change the welcome message.
Step 4: Create Server Blocks:
As mentioned earlier, by default, Nginx has only one server block. You can find it here — /etc/nginx/sites-available/default. So, we'll need two server blocks because we have two sites to support. The server restricts access to port 80. For our new server blocks, let's replicate the default server block.
-```sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com```
+```sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
+```
Similarly, copy the default file and create the second server block too.
Step 5: Mark One of the Two Servers as Default:
@@ -145,7 +160,8 @@ You can only have a single default server with the default_server option enabled
Step 6: Enable Server Blocks & Restart Nginx:
You can enable the server blocks by creating symbolic links from the server block configuration files to the sites-enabled directory.
-```sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/```
+```sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
+```
Nginx will begin handling requests for both domains from the appropriate blocks that are received on port 80 as soon as you create symbolic links for both domains and restart Nginx.
From 9a2e33521a10556ea5bdf233a27acc77db04d2aa Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Sun, 16 Apr 2023 13:40:23 +0530
Subject: [PATCH 19/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 53 +++++++++++++++++---------
1 file changed, 35 insertions(+), 18 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 146c3ba5..eead5a65 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -63,12 +63,14 @@ A package manager is typically included with every operating system. You have a
Step 1 : Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
-```sudo apt updatesudo apt-get update
+```
+sudo apt updatesudo apt-get update
```
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
Step 2 : Install Ngnix web server using apt:
-```sudo apt install nginxsudo apt-get install nginx
+```
+sudo apt install nginxsudo apt-get install nginx
```
Although the service starts automatically after installing Nginx, before you can test whether Nginx is working correctly or not, you will need to configure the OS firewall to access Nginx.
@@ -78,23 +80,28 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
Step 1: Install ufw:
-```sudo apt install ufw
+```
+sudo apt install ufw
```
Step 2: Check if ufw is working fine:
-```sudo ufw status
+```
+sudo ufw status
```
Step 3: Allow traffic over HTTP and recheck the status:
-```sudo ufw allow ‘Nginx HTTP’
+```
+sudo ufw allow ‘Nginx HTTP’
```
Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
-```sudo ufw allow ‘OpenSSH’
+```
+sudo ufw allow ‘OpenSSH’
```
Step 5: If the status was inactive when you checked earlier, activate it:
-```sudo ufw enable
+```
+sudo ufw enable
```
The choice of whether to implement the changes or not will be presented to you. Be aware that you won't be able to enter into the machine again if you deactivate TCP traffic or add a deny OpenSSH rule to the firewall. Let’s now cover some crucial Nginx commands for administration and management
@@ -102,19 +109,23 @@ The choice of whether to implement the changes or not will be presented to you.
## Nginx Installation and Management :
Step 1: Check the status of the Nginx server:
-```sudo systemctl status nginx
+```
+sudo systemctl status nginx
```
Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
-```http://servermania_server_ip
+```
+http://servermania_server_ip
```
Step 3: Use systemctl to start, stop, or restart your Nginx server:
-```sudo systemctl stop nginxsudo systemctl start
- nginxsudo systemctl restart nginx
+```
+sudo systemctl stop nginxsudo systemctl start
+nginxsudo systemctl restart nginx
```
Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
-```systemctl reload nginx # reloads Nginx configuration
+```
+systemctl reload nginx # reloads Nginx configuration
```
Use the reload command rather than the restart command whenever possible because it doesn't affect any current connections you may have to Nginx.
@@ -129,7 +140,8 @@ Create a directory, one for each domain:
Nginx only creates one server block by default, and it points to the /var/www/html directory. If you simply had one site, this would function flawlessly. All of the website's content is housed in the html subdirectory. For both of your domains, create the html subdirectories.
-```sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
+```
+sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
```
Step 1: Change ownership of the directories:
@@ -137,21 +149,25 @@ Doing this will enable the user to create and edit the contents of these new dir
Step 2: Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
-```sudo chmod -R 755 /var/www
+```
+sudo chmod -R 755 /var/www
```
Step 3: Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
-```nano /var/www/domainone.com/html/index.html
+```
+nano /var/www/domainone.com/html/index.html
```
Once the editor is open, paste the following into the editor:
-``` Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
+```
+ Welcome to ServerMania’s Domain One! You have reached Nginx via Server Block #1
```
Save the index.html file and create a similar one for the second domain. Make sure you change the welcome message.
Step 4: Create Server Blocks:
As mentioned earlier, by default, Nginx has only one server block. You can find it here — /etc/nginx/sites-available/default. So, we'll need two server blocks because we have two sites to support. The server restricts access to port 80. For our new server blocks, let's replicate the default server block.
-```sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
+```
+sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
```
Similarly, copy the default file and create the second server block too.
@@ -160,7 +176,8 @@ You can only have a single default server with the default_server option enabled
Step 6: Enable Server Blocks & Restart Nginx:
You can enable the server blocks by creating symbolic links from the server block configuration files to the sites-enabled directory.
-```sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
+```
+sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
```
Nginx will begin handling requests for both domains from the appropriate blocks that are received on port 80 as soon as you create symbolic links for both domains and restart Nginx.
From 1b82372d8a826eaeb250a5414146cb967925c684 Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Sun, 16 Apr 2023 14:00:12 +0530
Subject: [PATCH 20/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index eead5a65..55bc27c2 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -185,6 +185,15 @@ Nginx will begin handling requests for both domains from the appropriate blocks
You can try visiting both domains to test the modifications and check to see if the contents of index.html are rendered correctly.
The installation of Nginx on Ubuntu 20.04 can now begin.
+## References :
+
+- https://www.techtarget.com/whatis/definition/Web-server
+
+- https://en.wikipedia.org/wiki/Web_server
+
+- https://www.solarwinds.com/resources/it-glossary/web-server#:~:text=The%20primary%20role%20of%20a,server%20to%20ensure%20its%20safety
+
+- https://ubuntu.com/tutorials/install-and-configure-nginx
From a8451c394e0f464538f7696c5ca5cb2644f62344 Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Mon, 17 Apr 2023 11:30:24 +0530
Subject: [PATCH 21/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 55bc27c2..fa24306f 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -23,10 +23,15 @@ Requests for static material (such as HTML pages, files, pictures, and videos) f
There are mainly 5 Types of Web Servers:
+
• Apache
+
• Nginx
+
• Microsoft IIS
+
• Lighttpd
+
• Jigsaw
From da0e17fee5bec7851cb499b9c1a71f06467645f2 Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Mon, 17 Apr 2023 11:43:19 +0530
Subject: [PATCH 22/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 34 +++++++++++++-------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index fa24306f..6644eb37 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -66,14 +66,14 @@ Jigsaw's modular design, which enables customers to easily adapt and increase th
A package manager is typically included with every operating system. You have a choice between using apt or apt-get with Ubuntu 20.04. As this is a new server, you first need to update the package manager.
-Step 1 : Upgrade the package management to the most recent version that is compatible:
+**Step 1 :** Upgrade the package management to the most recent version that is compatible:
You can either use the apt or apt-get package manager to install Nginx.
```
sudo apt updatesudo apt-get update
```
Now, you are ready to install Ngnix. When you are logged in with a non-root account with sudo rights, you will need to prefix every task that requires admin privileges with sudo.
-Step 2 : Install Ngnix web server using apt:
+**Step 2 :** Install Ngnix web server using apt:
```
sudo apt install nginxsudo apt-get install nginx
```
@@ -84,27 +84,27 @@ Although the service starts automatically after installing Nginx, before you can
The most popular method for creating iptables' ingress and egress rules. Uncomplicated Firewall, or ufw, is a user-friendly wrapper for iptables that is available in Ubuntu 20.04. Although it comes installed with Ubuntu 20.04 but to make sure that it is appropriately installed, install it manually. After installing Nginx, follow the instructions below to set up the firewall
-Step 1: Install ufw:
+**Step 1 :** Install ufw:
```
sudo apt install ufw
```
-Step 2: Check if ufw is working fine:
+**Step 2 :** Check if ufw is working fine:
```
sudo ufw status
```
-Step 3: Allow traffic over HTTP and recheck the status:
+**Step 3 :** Allow traffic over HTTP and recheck the status:
```
sudo ufw allow ‘Nginx HTTP’
```
-Step 4: Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
+**Step 4 :** Allow traffic over TCP (OpenSSH) too if you want to log into the machine again:
```
sudo ufw allow ‘OpenSSH’
```
-Step 5: If the status was inactive when you checked earlier, activate it:
+**Step 5 :** If the status was inactive when you checked earlier, activate it:
```
sudo ufw enable
```
@@ -113,22 +113,22 @@ The choice of whether to implement the changes or not will be presented to you.
## Nginx Installation and Management :
-Step 1: Check the status of the Nginx server:
+**Step 1 :** Check the status of the Nginx server:
```
sudo systemctl status nginx
```
-Step 2: You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
+**Step 2 :** You can also check if Nginx is working by accessing your website using the browser. Visit the following link:
```
http://servermania_server_ip
```
-Step 3: Use systemctl to start, stop, or restart your Nginx server:
+**Step 3 :** Use systemctl to start, stop, or restart your Nginx server:
```
sudo systemctl stop nginxsudo systemctl start
nginxsudo systemctl restart nginx
```
-Step 4: The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
+**Step 4 :** The Nginx configuration file is found at /etc/nginx/nginx.conf. If you make changes to the configuration, you can either restart the Nginx server or reload the configuration file.
```
systemctl reload nginx # reloads Nginx configuration
```
@@ -149,16 +149,16 @@ Nginx only creates one server block by default, and it points to the /var/www/ht
sudo mkdir -p /var/www/domainone.com/htmlsudo mkdir -p /var/www/domaintwo.com/html
```
-Step 1: Change ownership of the directories:
+**Step 1 :** Change ownership of the directories:
Doing this will enable the user to create and edit the contents of these new directories.
-Step 2: Modify permissions for both the domain directories:
+**Step 2 :** Modify permissions for both the domain directories:
This step is important to make sure that you don’t need root privileges to make changes to any of the sites.
```
sudo chmod -R 755 /var/www
```
-Step 3: Create sample web pages for each domain/site:
+**Step 3 :** Create sample web pages for each domain/site:
Create a landing page index.html for both domains. Create a basic HTML snippet for a welcome page for both sites.
```
nano /var/www/domainone.com/html/index.html
@@ -169,17 +169,17 @@ Once the editor is open, paste the following into the editor:
```
Save the index.html file and create a similar one for the second domain. Make sure you change the welcome message.
-Step 4: Create Server Blocks:
+**Step 4 :** Create Server Blocks:
As mentioned earlier, by default, Nginx has only one server block. You can find it here — /etc/nginx/sites-available/default. So, we'll need two server blocks because we have two sites to support. The server restricts access to port 80. For our new server blocks, let's replicate the default server block.
```
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domainone.com
```
Similarly, copy the default file and create the second server block too.
-Step 5: Mark One of the Two Servers as Default:
+**Step 5 :** Mark One of the Two Servers as Default:
You can only have a single default server with the default_server option enabled. Please remove it from one of the server blocks.
-Step 6: Enable Server Blocks & Restart Nginx:
+**Step 6 :** Enable Server Blocks & Restart Nginx:
You can enable the server blocks by creating symbolic links from the server block configuration files to the sites-enabled directory.
```
sudo ln -s /etc/nginx/sites-available/domainone.com /etc/nginx/sites-enabled/
From 76d0e38a609578a0845fa37e8b53849460da286d Mon Sep 17 00:00:00 2001
From: Rose Francis <123229932+rosefranc@users.noreply.github.com>
Date: Mon, 17 Apr 2023 11:46:31 +0530
Subject: [PATCH 23/23] Update readme.md
---
learning/dashboard/webserver/readme.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/learning/dashboard/webserver/readme.md b/learning/dashboard/webserver/readme.md
index 6644eb37..78a14fd3 100644
--- a/learning/dashboard/webserver/readme.md
+++ b/learning/dashboard/webserver/readme.md
@@ -4,11 +4,17 @@
The Hyper Text Transfer Protocol (HTTP) and other protocols are used by the web server, a piece of hardware and software, to accept and process requests from clients all over the world. The web server displays contents by storing them, then gives users access to the webpages via text, images, videos, and other media. It employs
Physical Storage: To ensure the security of website data, all data is kept on a physical web server. A request is created and sent to the web server to process the data when an end user types the URL of your website into their browser or searches for it using a keyword.
Finding the web server on which to host a website is the responsibility of web browsers like Firefox, Chrome, or Internet Explorer.
+
## Use of a web server:-
+
A web server is primarily used to deliver and display website content to users or clients. The following are additional applications for web servers:
+
• Store and safeguard website data: A web server has the capacity to store and safeguard sensitive website data from unauthorised users.
+
• Manage bandwidth to control network traffic: A web server can assist in removing downtime brought on by heavy web traffic. In order to control the rate of data transmission over the internet and reduce unnecessary network traffic, web hosts can configure bandwidth.
+
• Server-side web scripting: This feature enables users to use scripting languages like Ruby, Python, and PHP to create dynamic web pages.
+
• Virtual hosting: In order to run multiple applications, websites, and data, web servers can also be used as virtual servers.