linux下Apache默认安装路径

这篇博客介绍了Linux环境下Apache的默认安装路径。通过RPM包安装时,Apache位于/etc/httpd目录,配置文件为httpd.conf,web内容存储在/var/www/html。源代码安装则通常在/usr/local/apache2。当遇到Apache启动端口冲突问题,如Address already in use错误,可通过修改httpd.conf中的端口设置来解决。
摘要由CSDN通过智能技术生成

如果采用RPM包安装,安装路径应在 /etc/httpd目录下
apache配置文件:/etc/httpd/conf/httpd.conf 可以修改相关的访问路径及配置
Apache模块路径:/usr/sbin/apachectl 启动模块
web目录:/var/www/html 项目的存储路径
如果采用源代码安装,一般默认安装在/usr/local/apache2目录下

启动apache报错信息,很大程度需要检查是不是端口被占用了,因为默认apache启动的是80端口。像nginx默认页是开启80端口。

报错信息如下:

[root@localhost ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 三 2018-12-05 14:42:42 CST; 11s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Proces
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黄宝康

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值