[英]Reloading Apache2 via Terminal in MAC OS X
Am trying to reload Apache 2 via /init.d/apache2 reload command in terminal but I get a command not found error and when I look at the etc/ directory in Finder I can't see any init.d folder. 我试图通过终端中的/init.d/apache2 reload命令重新加载Apache 2,但是我收到一条命令未找到错误,当我在Finder中查看etc /目录时,看不到任何init.d文件夹。 Is there somewhere else this init.d folder might be? 这个init.d文件夹可能还有其他地方吗?
Just type in the terminal: 只需输入终端:
sudo apachectl graceful
graceful reloads the configuration files and gracefully restarts. 正常重新加载配置文件并正常重启。 Any current connections are allowed to complete. 任何当前的连接都允许完成。
For more info on the apachectl command just type: 有关apachectl命令的更多信息,只需键入:
man apachectl
And if that doesn't work, you can try sudo apachectl restart
. 如果这不起作用,则可以尝试sudo apachectl restart
。 Just for reference, OS X doesn't use init.d
(although it used to); 仅供参考,OS X不使用init.d
(尽管它曾经使用过)。 it uses launchd
instead. 它使用launchd
代替。 See http://launchd.macosforge.org/ . 参见http://launchd.macosforge.org/ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.