CentOS 7 – Configure Apache HTTP Server

Run this command to install Apache httpd web server

# yum install httpd

To enable httpd service to start automatically

# systemctl enable httpd.service

ln -s ‘/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/multi-user.target.wants/httpd.service’

To start httpd service now

# systemctl start httpd.service

To verify the httpd service is running

# systemctl is-active httpd.service

# systemctl status httpd.service
httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: active (running) since Sat 2015-04-25 23:23:41 EDT; 1min 24s ago
Process: 17065 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Main PID: 17075 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: /system.slice/httpd.service
??17075 /usr/sbin/httpd -DFOREGROUND
??17076 /usr/sbin/httpd -DFOREGROUND
??17077 /usr/sbin/httpd -DFOREGROUND
??17078 /usr/sbin/httpd -DFOREGROUND
??17079 /usr/sbin/httpd -DFOREGROUND
??17080 /usr/sbin/httpd -DFOREGROUND

Apr 25 23:23:41 example.com systemd[1]: Starting The Apache HTTP Server…
Apr 25 23:23:41 exmaple.com systemd[1]: Started The Apache HTTP Server.

Posted in Linux Tagged with: , ,

Leave a Reply