don't dream your life, live your dreams !
I assume that you have a Centos installation.
You can copy/paste this script and use it to configure automatically your server.
#!/bin/bash ######################## #### Install apache #### ######################## echo "install httpd" yum -y install httpd mod_ssl echo "activate httpd at startup" systemctl enable httpd.service echo "start service" systemctl start httpd.service ######################## #### FIREWALL RULES #### ######################## echo "add service http (port 80) to firewall" firewall-cmd --permanent --add-service http echo "add service http (port 443) to firewall" firewall-cmd --permanent --add-service https echo "reload firewall-cmd" firewall-cmd --reload
That’s all 🙂
Have a look at the Apache Server Survival Guide here
Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.
admin