Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I rebooted my server and now the httpd will not restart.

I tried using the command "service httpd start" but get this in response

[root@mail ~]# sudo service httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:8888
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8888
no listening sockets available, shutting down
Unable to open logs

I am logged in as root. I have no directory in my ect directory called conf to find conf/httpd.conf nor do I have init.d/apache2 in my ect directory. I looked at my ect/init.d file but see nothing about ports.

I have a lot to learn but in the meantime I need to get this back up and running. Thanks for any help.

share|improve this question
    
Something is already bound port 8888. Running "netstat -tulpn | grep :8888" should tell you the name of process using the port. –  Dan Mar 6 at 16:15
    
[root@mail ~]# netstat -tulpn | grep :8888 [root@mail ~]# I get nothing :( –  Rick Mar 6 at 16:19
    
Sorry, I didn't read the error properly. It's not a bound port problem, it's an SELinux problem. Solution detailed in answer below. –  Dan Mar 6 at 16:29

1 Answer 1

up vote 1 down vote accepted

You've most likely got SELinux enabled and in "enforcing" mode.

You can disable it with:

sudo setenforce 0

You can then start apache as normal with

sudo service httpd start

If you want to disable SELinux permanently, edit /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled

If you want to continue using SELinux, you'll need to fix your config by adding access to the port, with something along the lines of

sudo semanage port -a -t http_port_t -p tcp 8888
share|improve this answer
    
This is on the right track. I did this right before you answered and can now get httpd to start. However, apachectl -k restart just returns a new line and nothing else. –  Rick Mar 6 at 16:49
    
ok this did solve my issue thanks –  Rick Mar 6 at 17:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.