×

This article covers how to create an Nginx server blocks to host multiple website on a single Debian machine. Nginx is a very popular high-performance web server that combines the power of reverse proxying, load balancing, caching and so much more. Depending on how it is configured, it can act as a reverse proxy as well as a load balancer for HTTP/HTTPS servers.


To install Nginx on Debian:

1. Update the Debian 10 Package Repository.

$  sudo apt update -y

2. Install Nginx on Debian 10.

$ sudo apt install nginx -y

3. To check the status of Nginx, execute:

$ systemctl status nginx



This article covers how to create an Nginx server block configuration to host multiple website on a single CentOS server.

Server Blocks, often referred to as Nginx virtual host are a feature of the Nginx web server that allows you to host multiple websites on one server.

To Test NGINX configuration file, run the command:

$ sudo nginx --t

If the syntax is OK, the output tells you the test was successful.


To restart your Nginx web server and confirm that it's running as expected:

$ sudo systemctl restart nginx
$ sudo systemctl status Nginx


To Enable HTTPS on Domain Hosted on Nginx:

You may consider encrypting your domain using Lets Encrypt SSL to add a layer of protection and secure traffic to and from the webserver:

$ sudo dnf install certbot python3-certbot-nginx
$ sudo certbot --nginx



This article covers how to install WordPress on Ubuntu 20.04 with Nginx HTTP Server and Let's Encrypt wildcard SSL Certificates. WordPress is a free, open-source, and most popular content management system that allows you to create a blog on the Internet.


You can install nginx, MariaDB, PHP and all the required PHP extensions with the following command:

$ apt-get install nginx mariadb-server php php-curl php-mysql php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip php-fpm -y

Once the LEMP server is installed, start the Nginx and MariaDB service with the following command:

$ systemctl start nginx
$ systemctl start mariadb


Nginx's inbuilt features includes:

  • Nginx is built to work on low memory usage.
  • It can support extremely high concurrency.
  • Is Ipv6 enabled.
  • Supports reverse proxy with efficient caching.
  • Provides an inbuilt load balancer.
  • Supports WebSockets.
  • Optimized handling of index files, static files and provides auto indexing.
  • Is accompanied with FastCGI for efficient caching.



This article will guide you on how to #install and configure #HAproxy load balancer on the #Linux system. 

You will learn the basic setup and configuration of HAproxy as a load balancer for #Apache web servers. Also, we looked at some commands for managing the HAproxy server. In the end, we tested the load balancing through the browser and the #curl command. 

HAProxy is free, open source #software that provides a high availability #load #balancer and proxy server for #TCP and HTTP-based applications that spreads requests across multiple servers.

To Deploy on Linux :

1. Download the source code of HAProxy.

2. Unzip the file into the desired location tar xvzf haproxy-1.8-dev1.

3. Compile the source code.

4. Create config file haproxy.cfg with the configuration details.

5. Start the haproxy with ./haproxy -f haproxy.

6. Access the status page on http:localhost:9999/stats.



This article will guide you on how to configure Squid #proxy server on a Linux system. There is a lot more you can do with Squid proxy server. 

Although primarily used for HTTP and FTP, #Squid includes limited support for several other protocols including Internet Gopher, SSL, TLS and HTTPS. Squid does not support the #SOCKS protocol, unlike Privoxy, with which Squid can be used in order to provide SOCKS support.

The squid. conf file defines the configuration for squid. The configuration includes (but not limited to) HTTP port number, the ICP request port number, incoming and outgoing requests, information about #firewall access, and various timeout information.

To connect Squid proxy:

i. Tools>Options>Advanced>Network>Settings.

ii. Select Manual proxy configuration and tick the 'use this proxy server for all protocols' box.

iii. Under HTTP Proxy: add the squid listening IP address, 10.0. 0.1. In the Port: section add the squid listening port 3128.

iv. Click OK to save the changes.



This article will guide you on steps to #install the Squid proxy server on your #Linux machine. You will also learn how to uninstall the Squid #proxy server in the #Ubuntu #machine and manage Squid services.

Squid is a caching proxy for the Web supporting HTTP, #HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages.

It is most often used in conjunction with a traditional LAMP stack (Linux, Apache, MySQL, PHP), and can be used to filter traffic on #HTTP, FTP, and HTTPS, and increase the speed (thus lower the response time) for a web server via caching.

To clear #squid proxy cache:

1. Stop the #httpd and squid services.

2. Delete the contents of the cache as follows: # rm -Rf /var/cache/rhn/*

3. Restart the squid and httpd services.



In this article, you will learn how to install Squid and steps to configure the Squid Proxy port and adjusting the access control list.




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com