Linux

Apache 以“/etc/httpd/conf/httpd.conf 上的語法錯誤:無效命令 ‘remove’”開頭

  • September 17, 2014

在我更改了php.ini最大文件上傳大小和最大文章大小後,重新啟動 apache 會在標題中顯示錯誤。為什麼?以及如何解決?

# 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

第 304 行如下:

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

刪除該片段上的第 3 行和第 4 行。您的配置應如下所示

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

引用自:https://serverfault.com/questions/629082