的Apachectl“服务已经加载”时,它不是

问题描述 投票:3回答:3

我想有点了解的终端和服务器。我下面的课程,并在此过程中它指出您可以就使用命令停止服务器的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>
apache unix terminal localhost httpd.conf
3个回答
1
投票

这很可能是一个配置错误。运行以下命令,修复任何错误

sudo apachectl configtest

0
投票

尝试

apachectl status

这可能是检查的Apache的状态的最好方法。


0
投票

你可以试试下面的

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo apachectl stop
sudo apachectl start
© www.soinside.com 2019 - 2024. All rights reserved.