A clustered web server on cloud is a technique used within web hosting to distribute the load across multiple machines or ‘nodes’. The aim of this technique is to remove single points of failure and increase website availability and uptime. It is typical that web clusters will utilize multiple backend and frontend nodes.
Clustering doesn’t have to be expensive and it’s extremely easy to get started with – this guide will demonstrate how to create a round robin two node clustered web server on cloud with Nginx and Varnish.
Varnish ® is a registered trademark of Varnish Software AB and its affiliates. Varnish is owned by Varnish Software(www.varnish-software.com/) and they own all related trademarks and IP rights for this software.
Nginx is owned by Nginx (https://www.nginx.com/) and they own all related trademarks and IP rights for this software.
Cognosys provides hardened images of Webserver with Nginx Varnish MySQL – LEMP + V Stack on all public cloud ( AWS marketplace and Azure ) also offers a secured and one-click deployment of Webserver with Nginx Varnish MySQL – LEMP + V Stack on cloud i.e. AWS marketplace and Azure with written and video tutorials.
Major Features of Webserver with Nginx Varnish MySQL – LEMP +V stack on cloud
It is an enterprise grade webserver with Nginx, Reverse proxy, Varnish Cache, Antivirus, Malicious IP Blocking DDoS protection.
This is a hardened webserver with Optimum Stacks designed for a high cocnurrency and lower latency.
A) Haproxy offloading SSL traffic and serving as Software LB.
B) Varnish as the cache layer offloading the static traffic.
C) Nginx with all of its glory to serve as main webserver.
There are multiple other optimizations at each level which have not been documented right from Antivirus, DDoS attack protection, health checks etc.
D) SSH is allowed at public port 2222 / pvt Port 22
E) SMTP server to send email.
G) Antivirus scans every 24 hrs as well as every 2 hrs of your nginx folder.
H) Auto DDOS protection if attempt to brute force.
Installation Instructions For Ubuntu
Note : How to find PublicDNS in Azure
Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Ubuntu instance on Azure Cloud
1) Download Putty.
2) Connect to virtual machine using following SSH credentials:
- Hostname: PublicDNS / IP of machine
- Port : 22
Username: Your chosen username when you created the machine ( For example: Azureuser)
Password : Your Chosen Password when you created the machine ( How to reset the password if you do not remember)
Step 2) Database Login Details:
Username : root || Password : Passw@rd123
Please use MySQL root password Passw@rd123 for the MySQL configuration.
Note: Please change the password immediately after the first login.
Step 3) Other Information:
1.PHP Version 5.6.30
2. Nginx root path is : /usr/share/nginx/html/
3.Varnish: Varnish serves the content on port 80 for Nginx running on port 8080.
This can changed with /etc/default/varnish and /etc/varnish/default.vcl
4.To restart services use:
- service varnish restart
- service nginx restart
5. Default ports:
- Http: 8080 and 80
- Mysql ports: By default these are not open on Public Endpoints. Mysql :3306
Configure custom inbound and outbound rules using this link
Windows Container – nginx demo