Unable to start Apache on 7080 port: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7080

Created:

2017-06-14 14:24:55 UTC

Modified:

2017-08-08 13:19:40 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to start Apache on 7080 port: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7080

Symptoms

1. Apache is running fine on 80/443 ports (without nginx).

2. Trying to enable nginx results in apache service that cannot start:

# cat /var/log/httpd/error_log
-- Unit httpd.service has begun starting up.
Jun 14 13:01:46 earth.awedns.com httpd[24064]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:7080
Jun 14 13:01:46 earth.awedns.com httpd[24064]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:7080
Jun 14 13:01:46 earth.awedns.com httpd[24064]: no listening sockets available, shutting down
Jun 14 13:01:46 earth.awedns.com httpd[24064]: AH00015: Unable to open logs
Jun 14 13:01:46 earth.awedns.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 14 13:01:46 earth.awedns.com kill[24066]: kill: cannot find process ""
Jun 14 13:01:46 earth.awedns.com systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 14 13:01:46 earth.awedns.com 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.

 3. The following errors are logged while starting Apache:

# cat /var/log/audit/audit.log
type=SYSCALL msg=audit(1497416874.641:3215781): arch=c000003e syscall=49 success=no exit=-13 a0=4 a1=7f11a5ad51d8 a2=1c a3=7fffcefd0670 items=0 ppid=1 pid=36620 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1497416874.642:3215782): avc: denied { name_bind } for pid=36620 comm="httpd" src=7080 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1497416874.642:3215782): arch=c000003e syscall=49 success=no exit=-13 a0=3 a1=7f11a5ad5118 a2=10 a3=7fffcefd08bc items=0 ppid=1 pid=36620 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)
type=SERVICE_START msg=audit(1497416874.726:3215783): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Cause

Wrong selinux context set for apache configuration files.

Resolution

Install Plesk selinux policies.

1. Run autoinstaller:

# plesk installer

2. Follow the menu and select Selinux Policy component

Have more questions? Submit a request
Please sign in to leave a comment.