Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Apache2 Failing To Start #89

#1

Not familiar with Apache, but have followed instructions for RompR installation and I am getting the following after configuration and restating Apache:

pi@home-pi:~/rompr $ sudo systemctl status apache2
× apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-10-28 14:59:55 GMT; 7s ago
Duration: 17min 59.378s
Docs: https://httpd.apache.org/docs/2.4/
Process: 7327 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 51ms

Oct 28 14:59:55 home-pi systemd[1]: Starting apache2.service - The Apache HTTP Server...
Oct 28 14:59:55 home-pi apachectl[7330]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/rompr.conf/404.php: Expected Badgers! but saw
Oct 28 14:59:55 home-pi apachectl[7327]: Action 'start' failed.
Oct 28 14:59:55 home-pi apachectl[7327]: The Apache error log may have more information.
Oct 28 14:59:55 home-pi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 28 14:59:55 home-pi systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 28 14:59:55 home-pi systemd[1]: Failed to start apache2.service - The Apache HTTP Server.

Is this an Apache or RompR configuration error? I have installed PHP8.2.24.

Cheers

  • replies 4
  • views 6
  • likes 0
#2

That log makes no sense whatsoever 😀

Syntax error on line 33 of /etc/apache2/sites-enabled/rompr.conf/404.php: Expected Badgers! but saw

/etc/apache2/sites-enabled/rompr.conf/404.php is not a file that exists, for a start. And why is it expecting Badgers? 😀

Perhaps the actual apache error log might contain something sensible? Systemd logs are never much help.

maxycatz · Author
#3

Ah, found the Badgers! thing; it's line 33 in the 404.php in the rompr folder.

Pasting the systemd log above some text was dropped off; I guess because of the html code, but this is the full line:

Oct 28 20:03:10 home-pi apachectl[9409]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/rompr.conf/404.php: Expected </title>Badgers!</title> but saw </head>

Is there an error in the script of 404.php?

#4

That message still makes no sense whatsoever but I suspect the problem is in your rompr.conf. Because Apache configuration files are dependant on version numbers of things outside apache it is almost impossible to write instructions that work for more than 6 months. This is why I recommend nginx over apache. I suspect there's a line in rompr.conf referencing something like mod_php7. I reckon if you change that to mod_php8 it'll work.

maxycatz · Author
#5

Switched to nginx and install is up and running.