{"id":1414,"date":"2025-08-01T10:16:55","date_gmt":"2025-08-01T10:16:55","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=1414"},"modified":"2025-08-01T10:16:57","modified_gmt":"2025-08-01T10:16:57","slug":"apache-http-server-command-reference-table-with-examples","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/","title":{"rendered":"Apache HTTP Server \u2013 Command Reference Table (with Examples)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. Service Management (Start\/Stop\/Restart)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><th>Output\/Usage<\/th><\/tr><\/thead><tbody><tr><td><code>systemctl start httpd<\/code><\/td><td>Starts the Apache service<\/td><td><code>sudo systemctl start httpd<\/code><\/td><td>Starts Apache web server<\/td><\/tr><tr><td><code>systemctl stop httpd<\/code><\/td><td>Stops the Apache service<\/td><td><code>sudo systemctl stop httpd<\/code><\/td><td>Shuts down Apache<\/td><\/tr><tr><td><code>systemctl restart httpd<\/code><\/td><td>Restarts Apache service<\/td><td><code>sudo systemctl restart httpd<\/code><\/td><td>Applies config changes<\/td><\/tr><tr><td><code>systemctl reload httpd<\/code><\/td><td>Reloads Apache config without downtime<\/td><td><code>sudo systemctl reload httpd<\/code><\/td><td>Graceful reload<\/td><\/tr><tr><td><code>systemctl status httpd<\/code><\/td><td>Shows status of Apache<\/td><td><code>sudo systemctl status httpd<\/code><\/td><td>Running\/Failed info<\/td><\/tr><tr><td><code>systemctl enable httpd<\/code><\/td><td>Enable Apache to start on boot<\/td><td><code>sudo systemctl enable httpd<\/code><\/td><td>Auto-start at boot<\/td><\/tr><tr><td><code>systemctl disable httpd<\/code><\/td><td>Disable Apache at boot<\/td><td><code>sudo systemctl disable httpd<\/code><\/td><td>Stop auto-start<\/td><\/tr><tr><td><code>apachectl graceful<\/code><\/td><td>Gracefully restarts Apache<\/td><td><code>sudo apachectl graceful<\/code><\/td><td>No connection drop<\/td><\/tr><tr><td><code>apachectl restart<\/code><\/td><td>Restart Apache<\/td><td><code>sudo apachectl restart<\/code><\/td><td>Full restart<\/td><\/tr><tr><td><code>apachectl stop<\/code><\/td><td>Stop Apache<\/td><td><code>sudo apachectl stop<\/code><\/td><td>Hard stop<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>systemctl start apache2<\/code><\/td><td>Starts the Apache service on Debian\/Ubuntu (Systemd).<\/td><td><code>sudo systemctl start apache2<\/code><\/td><\/tr><tr><td><code>systemctl start httpd<\/code><\/td><td>Starts the Apache service on CentOS\/RHEL (Systemd).<\/td><td><code>sudo systemctl start httpd<\/code><\/td><\/tr><tr><td><code>service apache2 start<\/code><\/td><td>Starts the Apache service on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo service apache2 start<\/code><\/td><\/tr><tr><td><code>service httpd start<\/code><\/td><td>Starts the Apache service on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo service httpd start<\/code><\/td><\/tr><tr><td><code>systemctl enable apache2<\/code><\/td><td>Enables Apache to start automatically at boot on Debian\/Ubuntu (Systemd).<\/td><td><code>sudo systemctl enable apache2<\/code><\/td><\/tr><tr><td><code>systemctl enable httpd<\/code><\/td><td>Enables Apache to start automatically at boot on CentOS\/RHEL (Systemd).<\/td><td><code>sudo systemctl enable httpd<\/code><\/td><\/tr><tr><td><code>chkconfig apache2 on<\/code><\/td><td>Enables Apache to start at boot on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo chkconfig apache2 on<\/code><\/td><\/tr><tr><td><code>chkconfig httpd on<\/code><\/td><td>Enables Apache to start at boot on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo chkconfig httpd on<\/code><\/td><\/tr><tr><td><code>systemctl stop apache2<\/code><\/td><td>Stops the Apache service on Debian\/Ubuntu (Systemd).<\/td><td><code>sudo systemctl stop apache2<\/code><\/td><\/tr><tr><td><code>systemctl stop httpd<\/code><\/td><td>Stops the Apache service on CentOS\/RHEL (Systemd).<\/td><td><code>sudo systemctl stop httpd<\/code><\/td><\/tr><tr><td><code>service apache2 stop<\/code><\/td><td>Stops the Apache service on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo service apache2 stop<\/code><\/td><\/tr><tr><td><code>service httpd stop<\/code><\/td><td>Stops the Apache service on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo service httpd stop<\/code><\/td><\/tr><tr><td><code>systemctl restart apache2<\/code><\/td><td>Restarts the Apache service (stops and starts) on Debian\/Ubuntu (Systemd).<\/td><td><code>sudo systemctl restart apache2<\/code><\/td><\/tr><tr><td><code>systemctl restart httpd<\/code><\/td><td>Restarts the Apache service on CentOS\/RHEL (Systemd).<\/td><td><code>sudo systemctl restart httpd<\/code><\/td><\/tr><tr><td><code>service apache2 restart<\/code><\/td><td>Restarts the Apache service on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo service apache2 restart<\/code><\/td><\/tr><tr><td><code>service httpd restart<\/code><\/td><td>Restarts the Apache service on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo service httpd restart<\/code><\/td><\/tr><tr><td><code>systemctl reload apache2<\/code><\/td><td>Reloads Apache configuration without stopping the service (graceful restart) on Debian\/Ubuntu.<\/td><td><code>sudo systemctl reload apache2<\/code><\/td><\/tr><tr><td><code>systemctl reload httpd<\/code><\/td><td>Reloads Apache configuration on CentOS\/RHEL.<\/td><td><code>sudo systemctl reload httpd<\/code><\/td><\/tr><tr><td><code>service apache2 reload<\/code><\/td><td>Reloads Apache configuration on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo service apache2 reload<\/code><\/td><\/tr><tr><td><code>service httpd reload<\/code><\/td><td>Reloads Apache configuration on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo service httpd reload<\/code><\/td><\/tr><tr><td><code>systemctl status apache2<\/code><\/td><td>Checks the status of the Apache service on Debian\/Ubuntu (Systemd).<\/td><td><code>sudo systemctl status apache2<\/code><\/td><\/tr><tr><td><code>systemctl status httpd<\/code><\/td><td>Checks the status of the Apache service on CentOS\/RHEL (Systemd).<\/td><td><code>sudo systemctl status httpd<\/code><\/td><\/tr><tr><td><code>service apache2 status<\/code><\/td><td>Checks the status of the Apache service on Debian\/Ubuntu (SysVinit).<\/td><td><code>sudo service apache2 status<\/code><\/td><\/tr><tr><td><code>service httpd status<\/code><\/td><td>Checks the status of the Apache service on CentOS\/RHEL (SysVinit).<\/td><td><code>sudo service httpd status<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Configuration Checking<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><th>Output\/Usage<\/th><\/tr><\/thead><tbody><tr><td><code>apachectl configtest<\/code><\/td><td>Test Apache config syntax<\/td><td><code>sudo apachectl configtest<\/code><\/td><td>Shows <code>Syntax OK<\/code> or errors<\/td><\/tr><tr><td><code>httpd -t<\/code><\/td><td>Another way to test config<\/td><td><code>sudo httpd -t<\/code><\/td><td>Syntax validation<\/td><\/tr><tr><td><code>httpd -S<\/code><\/td><td>Show vhost configuration<\/td><td><code>sudo httpd -S<\/code><\/td><td>VHost layout and issues<\/td><\/tr><tr><td><code>apachectl -t -D DUMP_VHOSTS<\/code><\/td><td>List all virtual hosts<\/td><td><code>sudo apachectl -t -D DUMP_VHOSTS<\/code><\/td><td>Host\/port mapping<\/td><\/tr><tr><td><code>apachectl -t -D DUMP_MODULES<\/code><\/td><td>List all loaded modules<\/td><td><code>sudo apachectl -t -D DUMP_MODULES<\/code><\/td><td>Active modules<\/td><\/tr><tr><td><code>apachectl -t -D DUMP_RUN_CFG<\/code><\/td><td>Show running config<\/td><td><code>sudo apachectl -t -D DUMP_RUN_CFG<\/code><\/td><td>Runtime configuration<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>httpd -d &lt;serverroot&gt;<\/code><\/td><td>Sets the <code>ServerRoot<\/code> directory for configuration files.<\/td><td><code>httpd -d \/usr\/local\/apache2<\/code><\/td><\/tr><tr><td><code>httpd -f &lt;config&gt;<\/code><\/td><td>Specifies a custom configuration file.<\/td><td><code>httpd -f \/etc\/httpd\/conf\/custom.conf<\/code><\/td><\/tr><tr><td><code>httpd -C &lt;directive&gt;<\/code><\/td><td>Processes a directive before reading config files.<\/td><td><code>httpd -C \"Include \/etc\/httpd\/extra.conf\"<\/code><\/td><\/tr><tr><td><code>httpd -c &lt;directive&gt;<\/code><\/td><td>Processes a directive after reading config files.<\/td><td><code>httpd -c \"LogLevel debug\"<\/code><\/td><\/tr><tr><td><code>httpd -D &lt;parameter&gt;<\/code><\/td><td>Sets a parameter for use with <code>&lt;IfDefine&gt;<\/code> directives.<\/td><td><code>httpd -D SSL<\/code><\/td><\/tr><tr><td><code>httpd -e &lt;level&gt;<\/code><\/td><td>Sets <code>LogLevel<\/code> during startup for debugging.<\/td><td><code>httpd -e debug<\/code><\/td><\/tr><tr><td><code>httpd -E &lt;file&gt;<\/code><\/td><td>Sends startup error messages to a file.<\/td><td><code>httpd -E \/var\/log\/httpd\/startup_errors.log<\/code><\/td><\/tr><tr><td><code>httpd -k start<\/code><\/td><td>Starts the Apache server.<\/td><td><code>httpd -k start<\/code><\/td><\/tr><tr><td><code>httpd -k restart<\/code><\/td><td>Restarts the Apache server.<\/td><td><code>httpd -k restart<\/code><\/td><\/tr><tr><td><code>httpd -k graceful<\/code><\/td><td>Gracefully restarts Apache without closing connections.<\/td><td><code>httpd -k graceful<\/code><\/td><\/tr><tr><td><code>httpd -k stop<\/code><\/td><td>Stops the Apache server.<\/td><td><code>httpd -k stop<\/code><\/td><\/tr><tr><td><code>httpd -k graceful-stop<\/code><\/td><td>Gracefully stops Apache without closing connections.<\/td><td><code>httpd -k graceful-stop<\/code><\/td><\/tr><tr><td><code>httpd -h<\/code><\/td><td>Displays a summary of command-line options.<\/td><td><code>httpd -h<\/code><\/td><\/tr><tr><td><code>httpd -l<\/code><\/td><td>Lists modules compiled into the server.<\/td><td><code>httpd -l<\/code><\/td><\/tr><tr><td><code>httpd -L<\/code><\/td><td>Lists all directives with their arguments and valid locations.<\/td><td><code>httpd -L<\/code><\/td><\/tr><tr><td><code>httpd -S<\/code><\/td><td>Shows parsed virtual host settings from the configuration file.<\/td><td><code>httpd -S<\/code><\/td><\/tr><tr><td><code>httpd -t<\/code><\/td><td>Tests configuration files for syntax errors.<\/td><td><code>httpd -t<\/code><\/td><\/tr><tr><td><code>httpd -T<\/code><\/td><td>Tests configuration files without checking document roots.<\/td><td><code>httpd -T<\/code><\/td><\/tr><tr><td><code>httpd -v<\/code><\/td><td>Prints the Apache version and exits.<\/td><td><code>httpd -v<\/code><\/td><\/tr><tr><td><code>httpd -V<\/code><\/td><td>Prints the Apache version and build parameters, then exits.<\/td><td><code>httpd -V<\/code><\/td><\/tr><tr><td><code>httpd -X<\/code><\/td><td>Runs Apache in single-process debug mode (no forking).<\/td><td><code>httpd -X<\/code><\/td><\/tr><tr><td><code>httpd -M<\/code><\/td><td>Lists all loaded modules (static and dynamic).<\/td><td><code>httpd -M<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. Apache Files and Paths (Default)<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>File\/Path<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>\/etc\/httpd\/conf\/httpd.conf<\/code><\/td><td>Main Apache config file<\/td><td>Configure ports, modules, logging<\/td><\/tr><tr><td><code>\/etc\/httpd\/conf.d\/<\/code><\/td><td>Directory for custom .conf files<\/td><td>Add vhosts here<\/td><\/tr><tr><td><code>\/var\/www\/html\/<\/code><\/td><td>Default document root<\/td><td>Store website files here<\/td><\/tr><tr><td><code>\/etc\/httpd\/logs\/<\/code> or <code>\/var\/log\/httpd\/<\/code><\/td><td>Log directory<\/td><td>Access and error logs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>apachectl start<\/code><\/td><td>Starts the Apache HTTP daemon. Errors if already running.<\/td><td><code>sudo apachectl start<\/code><\/td><\/tr><tr><td><code>apachectl stop<\/code><\/td><td>Stops the Apache HTTP daemon.<\/td><td><code>sudo apachectl stop<\/code><\/td><\/tr><tr><td><code>apachectl restart<\/code><\/td><td>Restarts the Apache daemon (stops and starts, checks configuration).<\/td><td><code>sudo apachectl restart<\/code><\/td><\/tr><tr><td><code>apachectl graceful<\/code><\/td><td>Gracefully restarts Apache without aborting open connections.<\/td><td><code>sudo apachectl graceful<\/code><\/td><\/tr><tr><td><code>apachectl graceful-stop<\/code><\/td><td>Gracefully stops Apache without aborting open connections.<\/td><td><code>sudo apachectl graceful-stop<\/code><\/td><\/tr><tr><td><code>apachectl configtest<\/code><\/td><td>Tests configuration files for syntax errors without starting the server.<\/td><td><code>sudo apachectl configtest<\/code><\/td><\/tr><tr><td><code>apachectl status<\/code><\/td><td>Displays a full status report using <code>mod_status<\/code> (requires text-based browser like <code>lynx<\/code>).<\/td><td><code>sudo apachectl status<\/code><\/td><\/tr><tr><td><code>apachectl fullstatus<\/code><\/td><td>Similar to <code>status<\/code>, provides detailed server status (requires <code>mod_status<\/code>).<\/td><td><code>sudo apachectl fullstatus<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. Manual Testing Commands<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><th>Use<\/th><\/tr><\/thead><tbody><tr><td><code>curl http:\/\/localhost<\/code><\/td><td>Test if Apache is serving pages<\/td><td><code>curl http:\/\/localhost<\/code><\/td><td>Get default page<\/td><\/tr><tr><td>`netstat -tulnp<\/td><td>grep :80`<\/td><td>Check if port 80 is open<\/td><td>`sudo netstat -tulnp<\/td><\/tr><tr><td>`ss -tuln<\/td><td>grep :80`<\/td><td>Alternative to netstat<\/td><td>`sudo ss -tuln<\/td><\/tr><tr><td>`ps aux<\/td><td>grep httpd`<\/td><td>Check running Apache processes<\/td><td>`ps aux<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. Installation Commands<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>yum install httpd<\/code><\/td><td>Install Apache (CentOS\/RHEL)<\/td><td><code>sudo yum install httpd -y<\/code><\/td><\/tr><tr><td><code>apt install apache2<\/code><\/td><td>Install Apache (Debian\/Ubuntu)<\/td><td><code>sudo apt install apache2 -y<\/code><\/td><\/tr><tr><td><code>dnf install httpd<\/code><\/td><td>Fedora\/RHEL 8+ installation<\/td><td><code>sudo dnf install httpd -y<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. Log Management<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Log File<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>\/var\/log\/httpd\/access_log<\/code><\/td><td>Tracks all access requests<\/td><td><code>sudo tail -f \/var\/log\/httpd\/access_log<\/code><\/td><\/tr><tr><td><code>\/var\/log\/httpd\/error_log<\/code><\/td><td>Logs errors<\/td><td><code>sudo tail -f \/var\/log\/httpd\/error_log<\/code><\/td><\/tr><tr><td><code>journalctl -u httpd<\/code><\/td><td>View Apache logs via systemd<\/td><td><code>sudo journalctl -u httpd<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. Module Management<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>a2enmod &lt;module&gt;<\/code><\/td><td>Enable module (Debian\/Ubuntu)<\/td><td><code>sudo a2enmod rewrite<\/code><\/td><\/tr><tr><td><code>a2dismod &lt;module&gt;<\/code><\/td><td>Disable module<\/td><td><code>sudo a2dismod autoindex<\/code><\/td><\/tr><tr><td><code>apachectl -M<\/code><\/td><td>Show loaded modules<\/td><td><code>sudo apachectl -M<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>a2enmod &lt;module&gt;<\/code><\/td><td>Enables a specific Apache module by creating a symlink in <code>mods-enabled<\/code>.<\/td><td><code>sudo a2enmod rewrite<\/code><\/td><\/tr><tr><td><code>a2dismod &lt;module&gt;<\/code><\/td><td>Disables a specific Apache module by removing the symlink from <code>mods-enabled<\/code>.<\/td><td><code>sudo a2dismod proxy_http2<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. Virtual Host Configuration (Sample Format)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n    ServerName www.example.com\n    DocumentRoot \/var\/www\/example\n    ErrorLog \/var\/log\/httpd\/example_error.log\n    CustomLog \/var\/log\/httpd\/example_access.log combined\n&lt;\/VirtualHost&gt;\n<\/code><\/pre>\n\n\n\n<p>Enable with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl reload httpd\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. Reload Without Downtime<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>apachectl graceful<\/code><\/td><td>Reload config without killing connections<\/td><td><code>sudo apachectl graceful<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary Table: Most Used Apache Commands<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Purpose<\/th><th>Command<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>Start Apache<\/td><td><code>systemctl start httpd<\/code><\/td><td><code>sudo systemctl start httpd<\/code><\/td><\/tr><tr><td>Test Config<\/td><td><code>apachectl configtest<\/code><\/td><td><code>sudo apachectl configtest<\/code><\/td><\/tr><tr><td>Restart Apache<\/td><td><code>apachectl restart<\/code><\/td><td><code>sudo apachectl restart<\/code><\/td><\/tr><tr><td>Check Virtual Hosts<\/td><td><code>apachectl -S<\/code><\/td><td><code>sudo apachectl -S<\/code><\/td><\/tr><tr><td>View Logs<\/td><td><code>journalctl -u httpd<\/code><\/td><td><code>sudo journalctl -u httpd<\/code><\/td><\/tr><tr><td>Enable Auto-start<\/td><td><code>systemctl enable httpd<\/code><\/td><td><code>sudo systemctl enable httpd<\/code><\/td><\/tr><tr><td>Install Apache<\/td><td><code>apt install apache2<\/code><\/td><td><code>sudo apt install apache2<\/code><\/td><\/tr><tr><td>Check Modules<\/td><td><code>apachectl -M<\/code><\/td><td><code>sudo apachectl -M<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Service Management (Start\/Stop\/Restart) Command Description Example Output\/Usage systemctl start httpd Starts the Apache service sudo systemctl start httpd Starts Apache web server systemctl stop httpd Stops the Apache service sudo systemctl stop httpd Shuts down Apache systemctl restart httpd Restarts Apache service sudo systemctl restart httpd Applies config changes systemctl reload httpd Reloads Apache &#8230; <a title=\"Apache HTTP Server \u2013 Command Reference Table (with Examples)\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\" aria-label=\"Read more about Apache HTTP Server \u2013 Command Reference Table (with Examples)\">Read more<\/a><\/p>\n","protected":false},"author":200020,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1414","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"1. Service Management (Start\/Stop\/Restart) Command Description Example Output\/Usage systemctl start httpd Starts the Apache service sudo systemctl start httpd Starts Apache web server systemctl stop httpd Stops the Apache service sudo systemctl stop httpd Shuts down Apache systemctl restart httpd Restarts Apache service sudo systemctl restart httpd Applies config changes systemctl reload httpd Reloads Apache ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-01T10:16:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-01T10:16:57+00:00\" \/>\n<meta name=\"author\" content=\"Pritesh Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pritesh Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\"},\"author\":{\"name\":\"Pritesh Kumar\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"headline\":\"Apache HTTP Server \u2013 Command Reference Table (with Examples)\",\"datePublished\":\"2025-08-01T10:16:55+00:00\",\"dateModified\":\"2025-08-01T10:16:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\"},\"wordCount\":762,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\",\"name\":\"Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"datePublished\":\"2025-08-01T10:16:55+00:00\",\"dateModified\":\"2025-08-01T10:16:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache HTTP Server \u2013 Command Reference Table (with Examples)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\",\"name\":\"Pritesh Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"caption\":\"Pritesh Kumar\"},\"description\":\"Devops Engineer at Cotocus pvt.ltd\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!","og_description":"1. Service Management (Start\/Stop\/Restart) Command Description Example Output\/Usage systemctl start httpd Starts the Apache service sudo systemctl start httpd Starts Apache web server systemctl stop httpd Stops the Apache service sudo systemctl stop httpd Shuts down Apache systemctl restart httpd Restarts Apache service sudo systemctl restart httpd Applies config changes systemctl reload httpd Reloads Apache ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2025-08-01T10:16:55+00:00","article_modified_time":"2025-08-01T10:16:57+00:00","author":"Pritesh Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pritesh Kumar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/"},"author":{"name":"Pritesh Kumar","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"headline":"Apache HTTP Server \u2013 Command Reference Table (with Examples)","datePublished":"2025-08-01T10:16:55+00:00","dateModified":"2025-08-01T10:16:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/"},"wordCount":762,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/","url":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/","name":"Apache HTTP Server \u2013 Command Reference Table (with Examples) - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"datePublished":"2025-08-01T10:16:55+00:00","dateModified":"2025-08-01T10:16:57+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/apache-http-server-command-reference-table-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Apache HTTP Server \u2013 Command Reference Table (with Examples)"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1","name":"Pritesh Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","caption":"Pritesh Kumar"},"description":"Devops Engineer at Cotocus pvt.ltd","url":"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/200020"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1414"}],"version-history":[{"count":1,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1414\/revisions"}],"predecessor-version":[{"id":1415,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1414\/revisions\/1415"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}