我想有点了解的终端和服务器。我下面的课程,并在此过程中它指出您可以就使用命令停止服务器的Apache(在Mac上):
sudo apachectl start
但是,当我这样做,它回来了消息说,Apache是已在运作。完整的信息:
/System/Library/LaunchDaemons/org.apache.httpd.plist: service already loaded
阿帕奇显然不是,虽然运行:
ps aux | grep httpd
不返回任何活动。
我希望这是值得做的事实,我下面的课程是优胜美地和我运行埃尔卡皮坦。我不知道很多关于这个问题,我努力学习,但我甚至无法跟随当然,如果我甚至不能启动服务器。
任何人都可以帮忙吗?
谢谢,
P
编辑------------------------------------------------- --------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>org.apache.httpd</string>
<key>EnvironmentVariables</key>
<dict>
<key>XPC_SERVICES_UNAVAILABLE</key>
<string>1</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/httpd-wrapper</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
<key>OnDemand</key>
<false/>
</dict>
</plist>
这很可能是一个配置错误。运行以下命令,修复任何错误
sudo apachectl configtest
尝试
apachectl status
这可能是检查的Apache的状态的最好方法。
你可以试试下面的
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo apachectl stop
sudo apachectl start