# For some reason I had to start Apache on port 8082, but when I tried to start Apache as root I get:

Permission denied: make_sock: could not bind to address [::]:8082

CentOS use SElinux security, therefore there are pre-defined port that Apache can use. The ports are: 80, 443, 488, 8008, 8009, 8443. So if we want to use another port we should add it. In all sites I’ve found solutions to use the semanage command but when I enter it I got:

-bash: semanage: command not found

A standard installation does not contain semanage so install it by typing:

# yum -y install policycoreutils-python

After that we need to add port 8082.

# semanage port -a -t http_port_t -p tcp 8082

And now we can start Apache with

# /etc/init.d/httpd start

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.