重新启动 Apache 2 时配置测试失败

Jal*_*eel 3 apache2

 ServerAdmin admin@creansys.com
ServerName  creansys.com
ServerAlias www.creansys.com

DocumentRoot /var/www/creansys.com/public_html
<Directory / >
Options FollowSymLinks
Allow Override  All

</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
Allow Override All
Order Allow,Deny
allow From all

</Directory>
Run Code Online (Sandbox Code Playgroud)

当我尝试重新启动 apache 时,出现以下错误:语法错误
允许和拒绝必须后跟“from”。操作“配置测试”失败。

有人能帮我解决吗

A.B*_*.B. 5

您的配置中有一些拼写错误:

使用

<Directory />
    Options FollowSymLinks
    AllowOverride  All
</Directory>
Run Code Online (Sandbox Code Playgroud)

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)

之后你应该看到

% apachectl configtest               
Syntax OK
Run Code Online (Sandbox Code Playgroud)

为什么?因为我已经在我的系统上对其进行了测试,尤其是对您而言。;)