Apache gives an error of AH00526 (restart)

  • Posted on November 22, 2014
  • denycallAsked by denycall

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?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

Everyone can check our series of tutorials under the How To Set Up Apache Virtual Hosts

Hope that this helps!

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

# 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