Linux – Apache starts with “Syntax error on /etc/httpd/conf/httpd.conf: Invalid command ‘remove'”

apache-2.2centoslinuxPHP

After I changed php.ini max file upload size and the max post size, restarting apache shows the error in the title. Why? And how to resolve it?

# vi /etc/php.ini
# service httpd restart


# service httpd start
Starting httpd: Syntax error on line 304 of /etc/httpd/conf/httpd.conf:
Invalid command 'remove', perhaps misspelled or defined by a module not included in the server configuration

The line 304 follows:

<Directory />
    Options Includes Indexes FollowSymLinks MultiViews
    remove word Indexes
    Options Includes FollowSymlinks MultiViews
    AllowOverride None
</Directory>

Best Answer

del line 3 and 4 on that snippet. Your config should looks like this

<Directory />
    Options Includes Indexes FollowSymLinks MultiViews
    AllowOverride None
</Directory>