PHP-version change leads to apache config error

After a PHP-type (mod_php -> fcgi) and PHP-version-change, I got an Apache-config-error. Based on my backups, I can tell the following:

BEFORE, virtual host-config included:

Options IncludesNOEXEC SymLinksifOwnerMatch

AFTER,

Options IncludesNOEXEC SymLinksifOwnerMatch +ExecCGI

Because Apache wants to have all arguments with - and + OR no arguments at all with - or +, Apache returns an error:

Either all Options must start with + or -, or no Option may.
Action 'configtest' failed.

So I think that line should have been:

Options IncludesNOEXEC SymLinksifOwnerMatch ExecCGI

or

Options +IncludesNOEXEC +SymLinksifOwnerMatch +ExecCGI
Status: 
Active

Comments

Howdy -- in addition to PHP, was Apache recently upgraded perhaps?

The Apache syntax you're seeing there is normal for pre-2.4 Apache versions, but if Apache is updated to 2.4, or if the domain is migrated to a newer server, that can sometimes cause an issue like what you're describing.

Mostafa's picture
Submitted by Mostafa on Tue, 01/10/2017 - 11:13

You may run Re-check configuration in Virtualmin and see if apache is detected correctly.

Hi, I forgot to update: in those cases, the config is from an older virtualmin-server. We use the virtualmin-backup to make an backup and restore it on the new server. This was our solution for changing PHP5.2 to PHP5.3+ because Debian doesn't have an option to use multiple php-versions (and php5.2 is in many cases incompatible with php5.3).

So it concerns backups from an older Debian version to Ubuntu 14.04 or Ubuntu 16.04.