【问题标题】:How to start Apache server in Linux [closed]如何在 Linux 中启动 Apache 服务器 [关闭]
【发布时间】:2018-02-20 18:12:10
【问题描述】:

我创建了一个新的 httpd.conf 文件,现在我希望我的 Apache 使用该 conf 文件并开始。但这对我不起作用。当我尝试启动 Apache 时出现错误

./apachectl -k start
httpd: Could not open configuration file /usr/local/install/apache/conf/httpd.conf: No such file or directory

我的新 conf 文件位于

/home/<user>/conf/httpd.conf

我无法理解要在哪里更改才能使用此 http.conf

【问题讨论】:

  • # ln -sv /home/&lt;user&gt;/conf/httpd.conf /usr/local/install/apache/conf/httpd.conf

标签: linux apache unix


【解决方案1】:

首先安装apache。对于 ArchLinux,请遵循 this 安装指南。

然后启动服务刚刚运行这个命令广告管理员:

sudo systemctl start httpd.service

检查它是否正在使用:

sudo systemctl status httpd.service

【讨论】:

  • 这个(接受的)答案与问题有什么关系?问题是关于 conf 文件的位置而不是关于启动 apache...
【解决方案2】:

apachectl -f /home/&lt;user&gt;/conf/httpd.conf

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-16
    • 1970-01-01
    • 1970-01-01
    • 2013-02-03
    • 1970-01-01
    • 2013-11-20
    • 1970-01-01
    • 2020-09-27
    相关资源
    最近更新 更多