Having trouble starting/restarting httpd (apache)

do you have trouble like this?

 

[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

 

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 <- tentative
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s