User Tools

Site Tools


apache2

If you want to send us your comments, please do so. Thanks
More on comments


Apache2

Configuration test

Run

apachectl configtest

When you get

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 0000::0000:0000:0000:0000. Set the 'ServerName' directive globally to suppress this message
Syntax OK

Set the servername in /etc/apache2/apache2.conf

# Global configuration
#
ServerName localhost

As root restart Apache

systemctl restart apache2

and run

apachectl configtest

agian

Server Side Includes

Howto
httpd.conf location

Errors

apachectl configtest

Result

apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

Possible solution: Make sure /etc/apache2/apache2.conf exists
Also check

/var/log/apache2/error.log

Failed to start The Apache HTTP Server

This can occur after one of

systemctl status apache2.service
systemctl restart apache2

Extended output of systemctl status apache2.service

● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-08-11 20:24:49 UTC; 14s ago
Process: 8128 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

aug 11 20:24:49 Hostname systemd[1]: Starting The Apache HTTP Server...
aug 11 20:24:49 Hostname apachectl[8128]: apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directo
aug 11 20:24:49 Hostname apachectl[8128]: Action 'start' failed.
aug 11 20:24:49 Hostname apachectl[8128]: The Apache error log may have more information.
aug 11 20:24:49 Hostname systemd[1]: apache2.service: Control process exited, code=exited status=1
aug 11 20:24:49 Hostname systemd[1]: Failed to start The Apache HTTP Server.
aug 11 20:24:49 Hostname systemd[1]: apache2.service: Unit entered failed state.
aug 11 20:24:49 Hostname systeapache2.confmd[1]: apache2.service: Failed with result 'exit-code'.

Possible solution: Make sure /etc/apache2/apache2.conf exists. If not:

  • Uninstall apache2 and php7.0 (17 packages for Debian 9)
  • Purge ( _ in aptitude) them also (you have to find them, 16 packages, manually, thay are marked with a c in aptitude)
  • Reinstall PHP7.0. Apache2 will be installed also

Log evaluation

You can use goaccess to analyse the access.log file

Deinstallation

From the aptitude log

  • apache2:amd64 2.4.25-3+deb9u5
  • apache2-bin:amd64 2.4.25-3+deb9u5
  • apache2-data:amd64 2.4.25-3+deb9u5
  • apache2-utils:amd64 2.4.25-3+deb9u5
  • libapr1
  • libaprutil1
  • libaprutil1-dbd-sqlite3
  • libaprutil1-ldap
  • libapache2-mod-php7.0:amd64 7.0.30-0+deb9u1
  • libapache-poi-java:amd64 3.10.1-3

Optional

  • apachetop:amd64 0.12.6-18+b1

Apache Basics: Installation and Configuration Troubleshooting
.htaccess tutorial


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2022 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
apache2.txt · Last modified: 14-12-2021 15:01 by wim