DEV Community

Fega Suseno
Fega Suseno

Posted on • Edited on

Fix Apache Configuration

  • Fix DefaultRuntimeDir

apache2: Syntax error on line 83 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

source /etc/apache2/envvars
Enter fullscreen mode Exit fullscreen mode
apache2 -S
Enter fullscreen mode Exit fullscreen mode
  • Fix Error Code AH00558:

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

nano /etc/apache2/apache2.conf
Enter fullscreen mode Exit fullscreen mode

Add the following syntax at the very end

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# Add Servername
ServerName 127.0.0.1
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more