Linux Boot Camp Series – 01/Mar/2020

Apache Web Server

  • WebServer will respond to http requests with http responses.
  • Http (Hyper Text Transfer Protocol) is protocol which sends requests internally over tcp.
  • HTTP Request has
    • URL
    • Method
    • Headers
  • Basic WebServer should be able to host
    • Html + Java Script + CSS
  • Apache by default serves html pages

Apache as Static Web Site Host

  • Create a VM and Install apache
# ubuntu
sudo apt-get update
sudo apt-get install apache2 apache2-doc -y

# rhel
sudo yum install httpd -y

  • Navigate to document root (/var/www/html)
  • Create two html dummy contents
home.html
<html>
  Welcome to my site home
  <a href="info.html">Click Here for info</a>
</html>
info.html
<html>
  Welcome to my site info
  <a href="home.html">Click Here for home</a>
</html>
  • The above stuff is static. To make sites interactive, we need some programming languages like PHP, Python, dotnet etc
  • Apache Webserver is modular, we can extensions to apache to host php, python, dotnet core etc applications
  • Major Stuff to configure applications on apache server
    • Install necessary modules
    • configure apache hosts
  • Apache works with enabled and available
    • configuration
      • create a file /change the file in the conf-available folder
      • once changes are done then a2enconf <name>
    • modules
      • create a file/change the file in the mods-available folder
      • once the changes are done then exeucte a2enmod <name>
    • sites
      • create a file/change the file in the sites-available folder
      • once the changes are done then exeucte a2ensite <name>
    • If configuration is not working then we have a2dis*

Exercise:1

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube