Apache gives an error of AH00526 (restart)

Posted November 22, 2014 7.1k views

The error massage that I get when I try to restart apache

AH00526: Syntax error on line 20 of /etc/apache2/sites-enabled/zzz-deny-generic.conf:
Invalid ServerName “*” use ServerAlias to set multiple server names.
Action ‘configtest’ failed.
The Apache error log may have more information.

What shoul I do?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers
# zzz-deny-generic
# (c) Chris Stephenson 2014
# Licensed under GNU Public License v3 or later
# No warranty explicit or implied that this script is fit for purpose or even that it will not harm your computer
# This is the belt to default’s braces
# It tries to explicitly match any stray virtual host requests and deny them
# Not foolproof and needs to be done again for each ip on the server
# I couldn’t find a better way.
# Insert the correct IP in the VirtualHost line. If there is more than one IP on the server, repeat the
# whole VirtualHost block with that IP at the beginning.
<VirtualHost _IP_:80>
# match just about anything
ServerName *
ServerAlias *.*
ServerAlias *.*.*
ServerAlias *.*.*.*
ServerAlias *.*.*.*.*
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
# ban any access
<Directory />
AllowOverride None
Order allow,deny
deny from all
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined

i have the similar trouble.
AH00256: Syntax error on line 43 of /etc/httpd/conf.d/phpMyAdmin.conf:
Invalid command ‘Order’, perhaps misspelled or defined by a module not incluided in the server configuration