logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: apache2 restart fails
Author
cearlp



Joined: 17 Sep 2022
Posts: 3
Location: Clinton

PostPosted: Thu 05 Mar '26 2:25    Post subject: apache2 restart fails Reply with quote

Trying to restart Apache2 after insatalling SSL certificate fails. Following the comments on the failure I get the following -------
The command systemctl status apache2.service returns:

× apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2026-03-04 17:00:31 MST; 53s ago
Duration: 1h 14min 38.410s
Docs: https://httpd.apache.org/docs/2.4/
Process: 21239 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 20ms

Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: Starting apache2.service - The Apache HTTP Server...
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: apache2.service: Control process exited, code=exited, sta>
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: apache2.service: Failed with result 'exit-code'.
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: Failed to start apache2.service - The Apache HTTP Server.

The command journalctl -xeu apache2.service returns:

░░ The job identifier is 14360.
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: apache2.service: Control process exited, code=exited, sta>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Mar 04 17:00:31 mail.sigmadeltapi.club systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished with a failure.
░░
░░ The job identifier is 14360 and the job result is failed.

The config file is :<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName www.sigmadeltapi.club

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<VirtualHost *:443>
ServerName www.sigmadeltapi.club
DocumentRoot /var/www/html

SSLEngine on
SSLCertificateFile /etc/ssl/www_sigmadeltapi_club.crt
SSLCertificateKeyFile /etc/ssl/private/sigmadeltapi-club.key
SSLCertificateChainFile /etc/ssl/www_sigmadeltapi_club.ca
</VirtualHost>

One suggestion was that port 80 was being used by some other process, but nothing was using that port or even port 443.
Can anyone offer any other things that I can do to solve this situation?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7472
Location: EU, Germany, Next to Hamburg

PostPosted: Thu 05 Mar '26 12:03    Post subject: Reply with quote

run

Code:

# see if something is using the ports
sudo ss -tulpn
# check the config
sudo su
source /etc/apache2/envvars
/usr/sbin/apache2ctl -S
Back to top
cearlp



Joined: 17 Sep 2022
Posts: 3
Location: Clinton

PostPosted: Thu 05 Mar '26 18:55    Post subject: Reply with quote

Already did an ss -tulpn and no port 80 or 443 appeared in the list.
As for the apache2ctl command it shows the configuration file but no errors are shown.
An apache2ctl -t returns Syntax OK.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7472
Location: EU, Germany, Next to Hamburg

PostPosted: Fri 06 Mar '26 9:14    Post subject: Reply with quote

-t only parses the httpd.conf file while -S parses the include files as well. Please do that.

Also, you may share the errors from your Apache error log from this event.
Back to top


Reply to topic   Topic: apache2 restart fails View previous topic :: View next topic
Post new topic   Forum Index -> Apache