Score:0

Ubuntu 22.04 apache2 won't start

bs flag

Fresh install on a new computer (dell xps 13 plus) with ubuntu 22.04

systemctl start apache2

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.

systemctl status apache2.service

Nov 09 21:41:49 seb-XPS-9320 apachectl[21340]: [Wed Nov 09 21:41:49.267432 2022] 

[so:warn] [pid 21340] AH01574: module php7_module is already loaded, skipping
Nov 09 21:41:49 seb-XPS-9320 apachectl[21340]: [Wed Nov 09 21:41:49.267439 2022] [so:warn] [pid 21340] AH01574: module reqtimeout_module is already loaded, skipping
Nov 09 21:41:49 seb-XPS-9320 apachectl[21340]: [Wed Nov 09 21:41:49.267446 2022] [so:warn] [pid 21340] AH01574: module setenvif_module is already loaded, skipping
Nov 09 21:41:49 seb-XPS-9320 apachectl[21340]: [Wed Nov 09 21:41:49.267453 2022] [so:warn] [pid 21340] AH01574: module status_module is already loaded, skipping
Nov 09 21:41:49 seb-XPS-9320 apachectl[21340]: apache2: Syntax error on line 261 of /etc/apache2/apache2.conf: Syntax error on line 256 of /etc/apache2/sites-enabled/apache2.conf: Syntax error on line 2>
Nov 09 21:41:49 seb-XPS-9320 apachectl[21337]: Action 'start' failed.
Nov 09 21:41:49 seb-XPS-9320 apachectl[21337]: The Apache error log may have more information.
Nov 09 21:41:49 seb-XPS-9320 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Nov 09 21:41:49 seb-XPS-9320 systemd[1]: apache2.service: Failed with result 'exit-code'.
Nov 09 21:41:49 seb-XPS-9320 systemd[1]: Failed to start The Apache HTTP Server.

this is the code I have at line 261 of /etc/apache2/apache2.conf

IncludeOptional sites-enabled/*.conf

this is the code I have at line 256 of /etc/apache2/sites-enabled/apache2.conf

IncludeOptional sites-enabled/*.conf

what's wrong with these lines?

in flag
Looks like the issue is with one of the `.conf` files being loaded from within `sites-enabled`, and line 2 specifically
AtomiX84 avatar
ru flag
I'm afraid that it is a loop inclusion, you load in loop all *.conf file from site-enabled folder. In the site-enabled folder should have only *.conf with virtualHost which are symlink from sites-available folder created by a2ensite "sitename".
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.