I have installed a fresh copy of Centos 7. Then I restarted Apache but the Apache failed vĩ đại start. I have 3 days stucked in this issue. Even the tư vấn can not figure out the error.

sudo service httpd start


Failed vĩ đại start apache :
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.


httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-05-09 16:08:02 BST; 59s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 5710 (code=exited, status=1/FAILURE)

May 09 16:08:02 mike079.startdedicated.de systemd[1]: Starting The Apache HTTP Server...
May 09 16:08:02 mike079.startdedicated.de httpd[5710]: (98)Address already in use: AH00072: make_sock: could not bind vĩ đại address 85.25.12.20:80
May 09 16:08:02 startdedicated.de httpd[5710]: no listening sockets available, shutting down
May 09 16:08:02 startdedicated.de httpd[5710]: AH00015: Unable vĩ đại open logs
May 09 16:08:02 startdedicated.de systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 09 16:08:02.startdedicated.de kill[5712]: kill: cannot find process ""
May 09 16:08:02 .startdedicated.de systemd[1]: httpd.service: control process exited, code=exited status=1
May 09 16:08:02startdedicated.de systemd[1]: Failed vĩ đại start The Apache HTTP Server.
May 09 16:08:02 startdedicated.de systemd[1]: Unit httpd.service entered failed state.
May 09 16:08:02 mike: httpd.service failed.

asked May 9, năm 2016 at 15:19

I got the same error because of a simple typo in vhost.conf. Remember vĩ đại make sure you don't have any errors in the config files.

apachectl configtest

answered Nov 19, 2019 at 20:07

3

In my case I got the error simply because I had changed the Listen 80 vĩ đại listen 443 in the file

/etc/httpd/conf/httpd.conf 

Since I had installed mod_ssl using the yum commands

yum -y install mod_ssl  

there was a duplicate listen 443 directive in the tệp tin ssl.conf created during mod_ssl installation.

You can verify this if you have duplicate listen 80 or 443 by running the below command in linux centos (My linux)

grep  '443' /etc/httpd/conf.d/*

below is sample output

/etc/httpd/conf.d/ssl.conf:Listen 443 https
/etc/httpd/conf.d/ssl.conf:
/etc/httpd/conf.d/ssl.conf:#ServerName www.example.com:443

Simply reverting the listen 443 in httd.conf vĩ đại listen 80 fixed my issue.

Robert

5,30243 gold badges67 silver badges115 bronze badges

answered Oct 2, 2018 at 10:41

2

From your output:

no listening sockets available, shutting down

what basically means, that any port in which one apache is going vĩ đại be listening is already being used by another application.

netstat -punta | grep LISTEN

Will give you a list of all the ports being used and the information needed vĩ đại recognize which process is ví you can kill stop or tự whatever you want vĩ đại tự with it.

After doing a nmap of your ip I can see that

80/tcp    open     http

so I guess you sorted it out.

answered May 10, năm 2016 at 7:18

3

on command line type journalctl -xe and the results will be

SELinux is preventing /usr/sbin/httpd from name_bind access on the tcp_socket port 83 or 80

This means that the SELinux is running on your machine and you need vĩ đại disable it. then edit the configuration tệp tin by type the following

nano /etc/selinux/config

Then find the line SELINUX=enforce and change vĩ đại SELINUX=disabled

Then type the following and run rẩy the command vĩ đại start httpd

setenforce 0

Lastly start a server

systemctl start httpd

answered Aug trăng tròn, 2019 at 10:17

Allow Apache Through the Firewall

Allow the mặc định HTTP and HTTPS port, ports 80 and 443, through firewalld:

sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp

And reload the firewall:

sudo firewall-cmd --reload

answered Jan 23, 2020 at 10:17

1

Some other service may be using port 80: try vĩ đại stop the other services: HTTPD, SSL, NGINX, PHP, with the command sudo systemctl stop and then use the command sudo systemctl start httpd

answered Apr 4, 2020 at 1:28

1

For u the issue was the following:

[Sat Sep 10 00:43:20.999998 2022] [auth_digest:error] [pid 123456] (2)No such tệp tin or directory: AH01762: Failed vĩ đại create shared memory segment on tệp tin /run/httpd/authdigest_shm.128124
[Sat Sep 10 00:43:20.999999 2022] [auth_digest:error] [pid 123456] (2)No such tệp tin or directory: AH01760: failed vĩ đại initialize shm - all nonce-count checking and one-time noncesdisabled

I have just tailed the error logs vĩ đại get those two line above:

*ADMINSHELL* :/var/opt/custom_path/logs/httpd # tail error_log

So the problem was that this thư mục was missing: /run/httpd/

Solution:

mkdir /run/httpd
chown root:httpd /run/httpd
chmod 0710 /run/httpd

After this is done. You will be able vĩ đại restart the service:

systemctl restart httpd.service

Double check:

systemctl status httpd.service

answered Sep 9, 2022 at 23:28

The error could be anywhere, configs, libraries or the binaries. Error in the control process is a general error thrown by the system when its not able vĩ đại start/restart the service. In my case one of libraries linked vĩ đại the exe in the .service tệp tin has a problem. Fixing that library solved the problem.

answered Oct 5, 2021 at 20:52

1

try this cmd vĩ đại know the missing config or error in the tệp tin configuration $ apachectl configtest

answered Apr 27, 2022 at 11:02

I had almost the same error, and I found the error on vhost.conf tệp tin, which is located on /etc/httpd/conf.d/vhost.conf.

If you were configuring the virtual host, I suggest you look at the following tệp tin and find if you have any errors there.

/etc/httpd/conf.d/vhost.conf

answered Jun 23, 2022 at 21:34

For u also the same error happens after adding dummy SSL

in /etc/httpd/conf.d/ssl.conf tệp tin it's created a line lượt thích,

SLCertificateFile /etc/pki/tls/certs/localhost.crt

I changed it from SLCertificateFile vĩ đại SSLCertificateFile

SSLCertificateFile /etc/pki/tls/certs/localhost.crt

And after apache restart it started working fine.

answered Jan 14, 2023 at 18:52

A lot of answers here, but the basic steps vĩ đại solve this should be:

  1. Check syntax

httpd -t or apachectl configtest

  1. If step 1 returns Syntax OK then something else is wrong...

Assuming journalctl -xeu returned nothing of use, then it's time vĩ đại hunt down the error logs. The mặc định location is often /var/log/httpd but differs between distributions and your VirtualHost configurations.

I also got this error after changing a config tệp tin.

My case I just needed vĩ đại reload the daemon.

sudo systemctl daemon-reload

then restart service

systemctl restart theservice.service

    ServerName www.YOURDOMAIN.COM
    ServerAlias YOURDOMAIN.COM
    DocumentRoot /var/www/YOURDOMAIN.COM/public_html
    ErrorLog /var/www/YOURDOMAIN.COM/error.log
    CustomLog /var/www/YOURDOMAIN.COM/requests.log combined

    DocumentRoot /var/www/YOURDOMAIN.COM/public_html
    
        Options FollowSymLinks
        AllowOverride None
    
    
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    


answered Nov trăng tròn, 2018 at 9:37

1