概要:

thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
嗯,看状态
执行命令 systemctl status httpd.service
[root@cloud1 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 五 2016-08-26 11:13:09 CST; 6min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 9915 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 9913 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 9913 (code=exited, status=1/FAILURE)
8月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
8月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
8月 26 11:13:09 cloud1.localdomain httpd[9913]: no listening sockets available, shutting down
8月 26 11:13:09 cloud1.localdomain httpd[9913]: AH00015: Unable to open logs
8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
8月 26 11:13:09 cloud1.localdomain kill[9915]: kill: cannot find process ""
8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
8月 26 11:13:09 cloud1.localdomain systemd[1]: Failed to start The Apache HTTP Server.
8月 26 11:13:09 cloud1.localdomain systemd[1]: Unit httpd.service entered failed state.
8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service failed.
从上可以看到,80端口被占用了
执行journalctl -xe
[root@cloud1 bin]# journalctl -xe -- -- Unit session-9830.scope has finished starting up. -- -- The start-up result is done. 8月 26 11:01:01 cloud1.localdomain systemd[1]: Starting Session 9830 of user root. -- Subject: Unit session-9830.scope has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-9830.scope has begun starting up. 8月 26 11:01:01 cloud1.localdomain CROND[9744]: (root) CMD (run-parts /etc/cron.hourly) 8月 26 11:01:01 cloud1.localdomain run-parts(/etc/cron.hourly)[9747]: starting 0anacron 8月 26 11:01:01 cloud1.localdomain run-parts(/etc/cron.hourly)[9753]: finished 0anacron 8月 26 11:01:01 cloud1.localdomain run-parts(/etc/cron.hourly)[9755]: starting 0yum-hourly.cron 8月 26 11:01:01 cloud1.localdomain run-parts(/etc/cron.hourly)[9759]: finished 0yum-hourly.cron 8月 26 11:10:01 cloud1.localdomain systemd[1]: Started Session 9831 of user root. -- Subject: Unit session-9831.scope has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-9831.scope has finished starting up. -- -- The start-up result is done. 8月 26 11:10:01 cloud1.localdomain systemd[1]: Starting Session 9831 of user root. -- Subject: Unit session-9831.scope has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-9831.scope has begun starting up. 8月 26 11:10:01 cloud1.localdomain CROND[9870]: (root) CMD (/usr/lib64/sa/sa1 1 1) 8月 26 11:13:09 cloud1.localdomain polkitd[1171]: Registered Authentication Agent for unix-process:9908:450142261 (system bus name :1.19686 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object p 8月 26 11:13:09 cloud1.localdomain systemd[1]: Starting The Apache HTTP Server... -- Subject: Unit httpd.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has begun starting up. 8月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 8月 26 11:13:09 cloud1.localdomain httpd[9913]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 8月 26 11:13:09 cloud1.localdomain httpd[9913]: no listening sockets available, shutting down 8月 26 11:13:09 cloud1.localdomain httpd[9913]: AH00015: Unable to open logs 8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE 8月 26 11:13:09 cloud1.localdomain kill[9915]: kill: cannot find process "" 8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 8月 26 11:13:09 cloud1.localdomain systemd[1]: Failed to start The Apache HTTP Server. -- Subject: Unit httpd.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has failed. -- -- The result is failed. 8月 26 11:13:09 cloud1.localdomain systemd[1]: Unit httpd.service entered failed state. 8月 26 11:13:09 cloud1.localdomain systemd[1]: httpd.service failed. 8月 26 11:13:09 cloud1.localdomain polkitd[1171]: Unregistered Authentication Agent for unix-process:9908:450142261 (system bus name :1.19686, object path /org/freedesktop/PolicyKit1/Authenticatio
上面这是查看日志
查看Apache中的 httpd-vhosts.conf 文件,发现Listen 80 两次,httpd-vhosts.conf一次,httpd.conf一次
虚拟机里的加个#Listen 80 OK解决了
备注:apache\Apache\conf下,extra和original文件夹的含义
extra的意思是额外扩展
original的意思是源目录文件
original文件夹是配置文件的源文件备份,而真正要配置的是conf目录下的httpd.conf文件以及extra目录的额外扩展配置。
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
# thinkphp
# Apache配置重启Apache1
# restart
# 出错
# Apache配置启用出现错误解决办法
# 详解apache配置域名的坑
# 详解在Ubuntu上的Apache配置SSL(https证书)的正确姿势
# win10 apache配置虚拟主机后localhost无法使用的解决方法
# MAC下通过改apache配置文件切换php多版本的方法
# 修改Apache配置指定php配置文件php.ini的位置方法
# CentOS系统下Apache配置多域名或多端口映射的方法
# 非集成环境的php运行环境(Apache配置、Mysql)搭建安装图文教程
# Ubuntu Apache配置以及cgi配置方法
# Apache伪静态(Rewrite).htaccess文件详解与配置技巧
# 的是
# 这是
# 两次
# 用了
# 希望能
# 可以看到
# 报错
# 谢谢大家
# 重启
# 配置文件
# 机里
# 解决了
# 目录下
# 失败了
# man
# min
# Docs
# ExecStop
# kill
# apachectl
相关文章:
标准网站视频模板制作软件,现在有哪个网站的视频编辑素材最齐全的,背景音乐、音效等?
如何在阿里云香港服务器快速搭建网站?
电影网站制作价格表,那些提供免费电影的网站,他们是怎么盈利的?
建站之星图片链接生成指南:自助建站与智能设计教程
如何在万网ECS上快速搭建专属网站?
建站之星后台管理系统如何操作?
建站之星后台密码遗忘?如何快速找回?
如何用y主机助手快速搭建网站?
个人摄影网站制作流程,摄影爱好者都去什么网站?
简单实现Android文件上传
如何快速搭建高效简练网站?
魔方云NAT建站如何实现端口转发?
江苏网站制作公司有哪些,江苏书法考级官方网站?
c++怎么实现高并发下的无锁队列_c++ std::atomic原子变量与CAS操作【详解】
美食网站链接制作教程视频,哪个教做美食的网站比较专业点?
,在苏州找工作,上哪个网站比较好?
如何在阿里云虚拟机上搭建网站?步骤解析与避坑指南
动图在线制作网站有哪些,滑动动图图集怎么做?
如何快速搭建高效WAP手机网站吸引移动用户?
测试制作网站有哪些,测试性取向的权威测试或者网站?
Android滚轮选择时间控件使用详解
如何在西部数码注册域名并快速搭建网站?
c# 服务器GC和工作站GC的区别和设置
Python文件管理规范_工程实践说明【指导】
宝塔Windows建站如何避免显示默认IIS页面?
如何生成腾讯云建站专用兑换码?
北京网站制作公司哪家好一点,北京租房网站有哪些?
如何快速重置建站主机并恢复默认配置?
,怎么用自己头像做动态表情包?
如何高效配置IIS服务器搭建网站?
建站IDE高效指南:快速搭建+SEO优化+自适应模板全解析
电商网站制作价格怎么算,网上拍卖流程以及规则?
建站之星如何助力网站排名飙升?揭秘高效技巧
如何用IIS7快速搭建并优化网站站点?
成都网站制作报价公司,成都工业用气开户费用?
如何确保西部建站助手FTP传输的安全性?
如何高效完成独享虚拟主机建站?
网站制作难吗安全吗,做一个网站需要多久时间?
建站中国官网:模板定制+SEO优化+建站流程一站式指南
C++如何使用std::optional?(处理可选值)
如何获取PHP WAP自助建站系统源码?
建站10G流量真的够用吗?如何应对访问高峰?
建站之星如何修改网站生成路径?
做企业网站制作流程,企业网站制作基本流程有哪些?
高防服务器如何保障网站安全无虞?
网站制作的软件有哪些,制作微信公众号除了秀米还有哪些比较好用的平台?
非常酷的网站设计制作软件,酷培ai教育官方网站?
如何快速完成中国万网建站详细流程?
深圳 网站制作,深圳招聘网站哪个比较好一点啊?
*请认真填写需求信息,我们会在24小时内与您取得联系。