---
title: "apache 一些与模块相关的错误"
author: "m2000hsf"
date: "2012-02-13T22:15:30Z"
tags: []
categories: ["互联网"]
slug: "apache"
draft: false
lastmod: "2012-02-13T22:15:30Z"
id: 1404914
url: "https://develop.iteye.com/blog/1404914"
---

```java
root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 358 of /etc/httpd/conf/httpd.conf:
Invalid command 'Order', perhaps mis-spelled or defined by a module not included
in the server configuration
                                                           [failed]
```

需添加：
LoadModule access_module /etc/httpd/modules/mod_access.so
LoadModule auth_module /etc/httpd/modules/mod_auth.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 368 of /etc/httpd/conf/httpd.conf:
Invalid command 'UserDir', perhaps mis-spelled or defined by a module not includ
ed in the server configuration
                                                           [failed]
```

需添加：LoadModule userdir_module /etc/httpd/modules/mod_userdir.so

```java

[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 396 of /etc/httpd/conf/httpd.conf:
Invalid command 'DirectoryIndex', perhaps mis-spelled or defined by a module not
included in the server configuration
                                                           [failed]
```

需添加：LoadModule dir_module /etc/httpd/modules/mod_dir.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 419 of /etc/httpd/conf/httpd.conf:
Invalid command 'TypesConfig', perhaps mis-spelled or defined by a module not in
cluded in the server configuration
                                                           [failed]
```

需添加：LoadModule mime_module /etc/httpd/modules/mod_mime.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 491 of /etc/httpd/conf/httpd.conf:
Invalid command 'LogFormat', perhaps mis-spelled or defined by a module not incl
uded in the server configuration
                                                           [failed]
```

需添加：LoadModule log_config_module /etc/httpd/modules/mod_log_config.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 555 of /etc/httpd/conf/httpd.conf:
Invalid command 'Alias', perhaps mis-spelled or defined by a module not included
in the server configuration
                                                           [failed]
```

需添加：LoadModule alias_module /etc/httpd/modules/mod_alias.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 582 of /etc/httpd/conf/httpd.conf:
Invalid command 'SetEnvIf', perhaps mis-spelled or defined by a module not inclu
ded in the server configuration
                                                           [failed]
```

需添加：LoadModule setenvif_module /etc/httpd/modules/mod_setenvif.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 636 of /etc/httpd/conf/httpd.conf:
Invalid command 'IndexOptions', perhaps mis-spelled or defined by a module not i
ncluded in the server configuration
                                                           [failed]
```

需添加：LoadModule autoindex_module /etc/httpd/modules/mod_autoindex.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 784 of /etc/httpd/conf/httpd.conf:
Invalid command 'LanguagePriority', perhaps mis-spelled or defined by a module n
ot included in the server configuration
                                                           [failed]
```

需添加：LoadModule negotiation_module /etc/httpd/modules/mod_negotiation.so


```java
[root@srv-2 modules]# /etc/init.d/httpd start
Starting httpd:                                            [  ok  ]
[root@srv-2 modules]#
```