httpd

Installation

Install httpd using yum

[root@server ~]# yum -y install httpd
 
(snipped...)
 
Installed:
  httpd.x86_64 0:2.4.6-97.el7.centos
 
Dependency Installed:
  apr.x86_64 0:1.4.8-7.el7                     apr-util.x86_64 0:1.5.2-6.el7
  httpd-tools.x86_64 0:2.4.6-97.el7.centos     mailcap.noarch 0:2.1.41-2.el7
 
Complete!
 
[root@server ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
 
[root@server ~]# systemctl start httpd

Add the http service to the firewall

[root@server ~]# firewall-cmd --add-service=http --zone=public --permanent
success
[root@server ~]# firewall-cmd --reload
success

Configuration

  • Edit parameters in /etc/httpd/config/httpd.conf. For example;
    • ServerAdmin
    • ServerName
    • Options in <Directory "/var/www/html">
  • Enable user directory by editing /etc/httpd/config,d/userdir.conf.