I use bellow command for restart apache:
# ./apachectl restart
But I get bellow error:
AH00526: Syntax error on line 37 of /usr/local/httpd/conf/extra/httpd-vhosts.conf:
Either all Options must start with + or -, or no Option may.
my httpd-vhosts.conf
is bellow:
[root@localhost bin]# vim /usr/local/httpd/conf/extra/httpd-vhosts.conf
25 DocumentRoot "/usr/local/httpd/htdocs/whmcs"
26 ServerName 33.hk
27 ServerAlias http://www.33.hk
28 ErrorLog "logs/33.hk-error_log"
29 </VirtualHost>
30
31 <VirtualHost *:80>
32 #ServerAdmin [email protected]
33 DocumentRoot "/usr/local/httpd/htdocs/whmcs/admin"
34 ServerName 1.33.hk
35 DirectoryIndex index.php
36 <Directory "/usr/local/httpd/htdocs/whmcs/admin">
37 Options -Indexes FollowSymLinks
38 AllowOverride None
39 Order allow,deny
40 Allow from all
41 </Directory>
42 ErrorLog "logs/1.33.hk-error_log"
43 CustomLog "logs/1.33.hk-access_log" common
44 </VirtualHost>
My 37
line is Options -Indexes FollowSymLinks
, can you tell me where is the error?
2
Answers
See the docs https://httpd.apache.org/docs/2.4/mod/core.html#options :
Simply mark the option with + to make clear you want to add it like this:
You need to add prefix for both Indexes and FollowSymLinks.