Creating a new virtual server generates AH00526: Syntax error on httpd.conf

CentOS 7.4, Virtualmin 6.02 Apache 2.4.6

Creating a new virtual server generates a bad httpd.conf entry in the "Directory" section of the virtual host:

AH00526: Syntax error on line 2618 of /etc/httpd/conf/httpd.conf: Either all Options must start with + or -, or no Option may.

Options -Indexes SymLinksifOwnerMatch

This should be:

Options -Indexes +SymLinksifOwnerMatch

(Plus sign missing)

Status: 
Active

Comments

Howdy -- by default, it shouldn't generate an "Options" line with the parameters you're seeing there.

Is that by chance how it looks in the Server Templates?

To check that, take a peek in System Settings -> Server Templates -> Apache Website.

There, do the "Directives and settings for new websites" appear correct?

An example of what could cause that issue is if the settings were imported from a server running an older Apache version.

bperet's picture
Submitted by bperet on Tue, 02/13/2018 - 13:35

Good catch...

Full backups were restored from Apache 2.2 on CentOS 6.9, now running Apache 2.4 on CentOS 7.4. It appears even the default template was overwritten by the restore, as it contains deprecated 2.2 commands. I will update the templates.

Is there any way to restore the proper "defaults" to the default template, so I can use it as a reference?

Sorry, there isn't -- though if you have CentOS 7 with Virtualmin running on a test server, you could always pull it in from there.

If you don't, you could always ask for an example of that field in the Forums. Someone there is bound to have an unmodified version of that field.