apache2 won't start

Bug #1953222 reported by apsaras
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 20.04.3 LTS.

Clean install of apache2 (version 2.4.41-4ubuntu3.8 amd64)

apache2 won't start due to syntax error in config file, but I can't see the error.

Steps to reproduce:

sudo apt-get purge apache2
rm -r /etc/apache2
sudo apt-get install apache2

Expected to see: error-free start

What happened:
...
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2021-12-04 10:48:59 GMT; 10ms ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 3059008 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Dec 04 10:48:59 mycomputer systemd[1]: Starting The Apache HTTP Server...
Dec 04 10:48:59 mycomputer apachectl[3059021]: apache2: Syntax error on line 147 of /etc/apache2/apache2.conf: Syntax error on line 22 of /etc/apache2/mods-enabled/alias.conf:
Dec 04 10:48:59 mycomputer apachectl[3059008]: Action 'start' failed.
Dec 04 10:48:59 mycomputer apachectl[3059008]: The Apache error log may have more information.
Dec 04 10:48:59 mycomputer systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 04 10:48:59 mycomputer systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 04 10:48:59 mycomputer systemd[1]: Failed to start The Apache HTTP Server.
...

Revision history for this message
apsaras (xbuntuone) wrote :

The apache2 error log did not have more information:

/etc# ls -l /var/log/apache2/
total 0
-rw-r----- 1 root adm 0 Dec 4 10:48 access.log
-rw-r----- 1 root adm 0 Dec 4 10:48 error.log
-rw-r----- 1 root adm 0 Dec 4 10:48 other_vhosts_access.log

The config file that is tripping it up is /etc/apache2/mods-enabled/alias.conf, which apart from empty lines and comment lines contains

<IfModule alias_module>
        Alias /icons/ "/usr/share/apache2/icons/"

        <Directory "/usr/share/apache2/icons">
                Options FollowSymlinks
                AllowOverride None
                Require all granted
        </Directory>
</IfModule>

I don't know why this would be a problem.

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Bug reporting is about finding & fixing problems thus preventing future users from hitting the same bug.

I suspect a Support site would be more appropriate, eg. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709

(this bug report can be converted into a question)

In order to process this bug report, we need more details.

Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1953222

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
apsaras (xbuntuone) wrote :

Thanks for the reply. I ran the apport-collect command, though it said that no new information was going to be added.

Given you are suggesting a Support site, does that mean that I've just done something silly and it's not a bug? (I can believe that.)

Revision history for this message
Bryce Harrington (bryce) wrote :

> Given you are suggesting a Support site, does that mean that I've just
> done something silly and it's not a bug? (I can believe that.)

Hi apsaras, hopefully by now you've sorted out a solution to your issue, but just to follow up, the link Chris pointed to has an excellent run down of what makes a good, actionable bug report. Having that would help isolate whether the problem is due to a defect in the operating system itself, or just like a local issue (e.g. a typo in a config file, etc.) Support channels are better for getting rapid turnaround on questions and working through the steps to isolate the nature of the problem, and so are a great place to start.

If you do think this is a problem in apache itself, though, please do feel free to reopen.

Changed in apache2 (Ubuntu):
status: New → Invalid
Revision history for this message
apsaras (xbuntuone) wrote :

Thanks for the reply. I've not yet sorted out the problem as it happens.

I'll take your advice and ask on another forum. I am a bit puzzled because my steps to reproduce are very simple - apparently just a clean install - but I dare say something is misconfigured somewhere somehow.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.