Exploring Web Server Configurations for Different Use Cases ๐

๐ Hello! I'm passionate about DevOps and have over 1+ years of experience in the field. I'm proficient in a variety of cutting-edge technologies and always motivated to expand my knowledge and skills. Let's connect and grow together!
SKILLS:
๐น Languages & Runtimes: Python, Shell Scripting, HCL, YAML ๐น Cloud Technologies: AWS, Microsoft Azure, GCP ๐น Infrastructure Tools: Docker, Terraform, AWS CloudFormation ๐น Other Tools: Linux, Git and GitHub Actions, Jenkins, Jira, GitLab (beginner), Docker, AWS DevOps ๐น Web Development: HTML, CSS, Bootstrap, Python, SQL
Job & Responsibilities:
๐ Improved development efficiency by implementing CI/CD pipelines, resulting in a 30% reduction in deployment time on the test server. ๐ Strengthened deployment and testing reliability by utilizing Docker containers and optimizing Dockerfile, reducing development issues on the test server by 20%. โ๏ธ Automated S3 bucket log creation with Shell scripting, eliminating 100% of manual search and saving 2 hours per week. ๐ Scheduled EC2 instance start/stop using Lambda functions and Event Bridge, leading to a 25% decrease in infrastructure costs. ๐ง Utilized AWS, Linux, Python, Docker, Shell scripting, Terraform, Jenkins Pipelines, and automation to streamline workflows and improve overall system performance.
I'm very detail-oriented and possess strong written and verbal communication skills. As a high performer with a possibility mindset, I strive to solve problems using efficient approaches.
Let's Connect & Grow:
If you find my profile suitable for the role you are searching for, please feel free to reach out to me at sumanprasad9766@gmail.com.
๐Introduction:
In the world of web hosting and applications, the choice of a web server plays a crucial role in determining the performance, security, and accessibility of your online presence. Let's dive into the setup of three popular web serversโnginx, HAProxy, and Apache 2โeach tailored to distinct use cases. ๐

Nginx - Restricting Access Using nginx.conf ๐ง
Use Case: Control Access to Sensitive Areas
Steps:
๐ Open your nginx configuration file at
/etc/nginx/nginx.conf.๐ Within the
serverblock, add alocationblock for the restricted area:server { listen 80; server_name yourdomain.com; location /restricted { deny all; return 403; } # ... other configuration ... }๐พ Save the configuration file and restart nginx:
sudo systemctl restart nginx๐ Accessing
/restrictedwill now yield a 403 Forbidden error.

HAProxy - Software Load Balancing & SSL Certificates โ๏ธ๐
Use Case: Load Balancing and SSL Termination
Steps:
๐ Install HAProxy using:
sudo apt-get install haproxy๐ Edit your HAProxy configuration file at
/etc/haproxy/haproxy.cfg.๐ Configure the frontend for SSL termination:
frontend https_frontend bind *:443 ssl crt /etc/haproxy/ssl/your_certificate.pem mode http option httplog default_backend backend_servers๐ Define the backend servers:
backend backend_servers mode http balance roundrobin server webserver1 192.168.1.10:80 server webserver2 192.168.1.11:80 # Add more servers as needed๐พ Save the configuration and restart HAProxy:
sudo systemctl restart haproxy
Apache 2 - Setting Up a Web Server ๐ ๏ธ
Use Case: Basic Web Hosting
Steps:
๐ Install Apache 2 with:
sudo apt-get install apache2๐ Place your website files in
/var/www/html.๐ Create a virtual host configuration:
sudo nano /etc/apache2/sites-available/your_site.conf<VirtualHost *:80> ServerName yourdomain.com DocumentRoot /var/www/html/your_site # Other configuration directives </VirtualHost>๐ Enable the virtual host and necessary modules:
sudo a2ensite your_site.conf sudo a2enmod rewrite๐ For SSL, use Let's Encrypt certificates with
certbot:sudo apt-get install certbot python3-certbot-apache sudo certbot --apache๐พ Restart Apache:
sudo systemctl restart apache2
Choose the Right Web Server for Your Needs! ๐ก๏ธ
๐ Conclusion:
Each web server discussed above has its strengths, making them suitable for different scenarios. Nginx excels at access control, HAProxy shines as a load balancer and SSL terminator, and Apache 2 offers a robust foundation for general web hosting. Tailor your choice to your project's unique requirements and enjoy a seamlessly running web application. ๐๐.
๐ Checkout GitHub Repository for projects:
๐ https://linktr.ee/sumanprasad007





