My linux world » Apache Server

Apache Server


Prerequiste

I assume that you have a Centos installation.

Installation

You can copy/paste this script and use it to configure automatically your server.

  1. #!/bin/bash
  2.  
  3. ########################
  4. #### Install apache ####
  5. ########################
  6.  
  7. echo "install httpd"
  8. yum -y install httpd mod_ssl
  9.  
  10. echo "activate httpd at startup"
  11. systemctl enable httpd.service
  12.  
  13. echo "start service"
  14. systemctl start httpd.service
  15.  
  16.  
  17. ########################
  18. #### FIREWALL RULES ####
  19. ########################
  20.  
  21. echo "add service http (port 80) to firewall"
  22. firewall-cmd --permanent --add-service http
  23.  
  24. echo "add service http (port 443) to firewall"
  25. firewall-cmd --permanent --add-service https
  26.  
  27. echo "reload firewall-cmd"
  28. firewall-cmd --reload
  29.  

That’s all 🙂
Administration – Httpd

SOS i am lost!

Have a look at the Apache Server Survival Guide here


Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.