httpd -t -c的命令无效

时间:2015-06-22 14:42:05

标签: apache

这表明用以下方法调试Apache:

httpd -t -c httpd.conf

但是,使用Apache版本在我的Mac上运行它:Apache / 2.4.10(Unix)我得到:

$ httpd -t -c /etc/apache2/httpd.conf
AH00526: Syntax error on line 1 of -c/-C directives:
Invalid command '/etc/apache2/httpd.conf', perhaps misspelled or defined by a module not included in the server configuration

出了什么问题?

1 个答案:

答案 0 :(得分:0)

-c用于在读取httpd.conf之前处理apache指令 例如..

httpd -c "Alias /myweb/ /var/www/" -t -f /etc/httpd/conf/httpd.conf
正如Michael Berkowski所说,这可能是一个错字。