Apache无法运行

时间:2018-09-25 15:56:26

标签: apache gitlab

我有一台Centos 7服务器,其名称为一个要使用的服务器,另一个要与Apache一起使用。一切正常,直到我为两个域都启用了https。到目前为止,apache将不知道您是否启用了gitlab服务器。

-我在journalctl -xe练习中获得了以下内容:

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                                                                                    
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat                                                                                                               
--                                                                                                                                                                                         
-- A new session with the ID 1806 has been created for the user root.                                                                                                                      
--                                                                                                                                                                                         
-- The leading process of the session is 21782.                                                                                                                                            
sep 25 17:54:07 centOS sshd[21782]: pam_unix(sshd:session): session opened for user root by (uid=0)                                                                                        
sep 25 17:54:07 centOS systemd[1]: Started Session 1806 of user root.                                                                                                                      
-- Subject: Unit session-1806.scope has finished start-up                                                                                                                                  
-- Defined-By: systemd                                                                                                                                                                     
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                                                                                    
--                                                                                                                                                                                         
-- Unit session-1806.scope has finished starting up.                                                                                                                                       
--                                                                                                                                                                                         
-- The start-up result is done.                                                                                                                                                            
sep 25 17:54:07 centOS systemd[1]: Starting Session 1806 of user root.                                                                                                                     
-- Subject: Unit session-1806.scope has begun start-up                                                                                                                                     
-- Defined-By: systemd                                                                                                                                                                     
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel                                                                                                                    
--                                                                                                                                                                                         
-- Unit session-1806.scope has begun starting up.                                                                                                                                          
sep 25 17:54:32 centOS polkitd[488]: Registered Authentication Agent for unix-process:21855:10383292 (system bus name :1.3661 [/usr/bin/pkttyagent --notify-fsep 25 17:54:32 centOS systemd
-- 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.                                                                                                                                               
sep 25 17:54:32 centOS httpd[21861]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80                                                                     
sep 25 17:54:32 centOS httpd[21861]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80                                                                  
sep 25 17:54:32 centOS httpd[21861]: no listening sockets available, shutting down                                                                                                         
sep 25 17:54:32 centOS httpd[21861]: AH00015: Unable to open logs                                                                                                                          
sep 25 17:54:32 centOS systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE                                                                                       
sep 25 17:54:32 centOS kill[21863]: kill: cannot find process ""                                                                                                                           
sep 25 17:54:32 centOS systemd[1]: httpd.service: control process exited, code=exited status=1                                                                                             
sep 25 17:54:32 centOS 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.                                                                                                                                                                   
sep 25 17:54:32 centOS systemd[1]: Unit httpd.service entered failed state.                                                                                                                
sep 25 17:54:32 centOS systemd[1]: httpd.service failed.                                                                                                                                   
sep 25 17:54:32 centOS polkitd[488]: Unregistered Authentication Agent for unix-process:21855:10383292 (system bus name :1.3661, object path /org/freedesktoplines 5302-5347/5347 (END)

1 个答案:

答案 0 :(得分:0)

看起来端口80已被其他应用程序使用。转到Apache中的httpd.conf文件,并尝试更改为端口Listen 80只是为了找出问题所在。告诉我这是否可行。

更改自:

Listen 80
ServerName localhost:80

收件人:

Listen 8012
ServerName localhost:8012

在浏览器中输入:http://localhost:8012,以检查它是否适合您。