【问题标题】:Apache service wont start through windows servicesApache 服务不会通过 Windows 服务启动
【发布时间】:2018-12-04 10:23:22
【问题描述】:

使用 Apache2.4

我可以通过powershell或cmd启动服务器并监听8080端口。

我使用

创建了一个 Windows 服务
httpd.exe -k install

我可以看到该服务安装为 Apache2.4。

当我尝试通过 windows 服务启动服务器时,它失败并出现以下错误,而我可以从 cmd 启动 apache 服务器(运行完美)。

Error output here

【问题讨论】:

    标签: python django apache server


    【解决方案1】:

    出现此问题,但通过 cmd 运行 httpd 可以正常工作,请在事件查看器中查看详细错误

    运行 -> eventvwr -> windows -> 应用程序 ->

    【讨论】:

      【解决方案2】:

      如果您可以通过命令行运行httpd.exe,但无法将其作为服务启动;问题可能出在文件夹权限上。

      (如 Pradeep 所述,请参阅:)Run > eventvwr > windows > Application > ...

      如果错误是:

      DocumentRoot 必须是目录。

      确保您在 apache 配置中添加的所有带有 DocumentRoot 的路径都可以被服务访问。

      • 右键单击文件夹
      • 选择属性
      • 转到“安全”标签
      • 默认值(在我的例子中是 windows 10 pro)是:
        • 经过身份验证的用户
        • 系统
        • 管理员(PC 名称\管理员)
        • 用户(PC 名称\用户

      DocumentRoot中的一个文件夹没有列出上述用户,只有我的hotmail账号,意味着系统无法访问特定文件夹。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-12-29
        • 2012-08-17
        • 1970-01-01
        • 2017-03-13
        • 2012-07-31
        相关资源
        最近更新 更多