Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I edited the file /etc/apache2/sites-enabled/000-default and then tried to restart my apache server and this error came up:

Syntax error on line 20 of /etc/apache2/sites-enabled/000-default.save:
unknown order
Action 'configtest' failed.

Here is what the 000-default file looks like:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

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
</VirtualHost>
share|improve this question
1  
Is that file the 000-default.save file, or a 000-default file? There might be a sneaky character on that Order line it's referring to, can you try deleting and re-typing the line? –  Shane Madden Nov 27 '13 at 18:34

1 Answer 1

up vote 2 down vote accepted

EDIT Just a quick note to say, one way to avoid having your Apache server hosed if the config file chokes due to a change is to first reload Apache to see how it parses the config.

sudo service apache2 reload

The nice thing about reload is it will attempt to reload the settings in a config file, but it won’t force the server to stop or restart. If it chokes, it will send up an alert, but your Apache server is still running smoothly. If after a reload all is clean, you can then restart Apache to force settings if you wish.

Now, specific to your question the error states:

Syntax error on line 20 of /etc/apache2/sites-enabled/000-default.save: unknown order Action 'configtest' failed.

But then you are referring to:

/etc/apache2/sites-enabled/000-default

Seems like something went amiss when you were editing the 000-default file since that .save file shows up when a crash or some other non-normal way of exiting the editor happens.

Also, there should be only one 000-default and not a 000-default.save.

I would look in this file:

/etc/apache2/sites-available/000-default

Does that look right? No, then look here:

/etc/apache2/sites-available/000-default.save

Does that look right? Then replace the contents of 000-default with 000-default.save?

Once you have sites-available ironed out, go over to this directory:

/etc/apache2/sites-enabled/

And clean it up. Remove any files named 000-default or 000-default.save and create a proper symbolic link from sites-available to sites-enabled like this:

sudo ln -s /etc/apache2/sites-available/default /etc/apache2/sites-enabled/000-default

Note that when in sites-available the file is named default but when it is linked into sites-enabled it gets named 000-default to set the load order.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.