Fedora Linux: Start / Stop / Restart Apache Server

How do I start / stop / restart the Apache server under Fedora Linux using command line options?

httpd is the Apache HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process and can be started or stopped using service command under Fedora Linux. You must run the following commands as the root user:

ADVERTISEMENTS

Fedora Linux Stop Apache (HTTPD) Server Command

# service httpd stop
OR
# /etc/init.d/httpd stop

Fedora Linux Start Apache (HTTPD) Server Command

# service httpd start
OR
# /etc/init.d/httpd start

Fedora Linux Restart Apache (HTTPD) Server Command

# service httpd restart
OR
# /etc/init.d/httpd restart
You can also use the following syntax too:

apachectl -k start|restart|graceful|stop|graceful-stop

Signals httpd to start, restart, or stop:
# apachectl -k start
# apachectl -k stop
# apachectl -k restart
# apachectl -k graceful

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
2 comments… add one
  • Prasanna Kumar Sep 14, 2012 @ 15:51

    Thanks for the post it was really great … but can u also say how to deploy a simple servlet file or a simple web application on the same server with statements to execute on the terminal plz

  • Wil Apr 30, 2013 @ 14:35

    Thanks for the info! I’m new to linux and just installed Fedora 18, switched from Ubuntu and wondered why my Apache stopped working all of a sudden and I couldn’t start it up again. This article really helped thanks!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.