본문 바로가기

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

[Apache] Permission denied: make_sock: could not bind to address [::]:80

2018. 4. 30.
Permission denied: make_sock: could not bind to address [::]:80

 

$ ./apachectl start

httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.149.130 for ServerName

(13)Permission denied: make_sock: could not bind to address [::]:80

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs



원인


1024 이하 포트는 root 계정으로만 접근이 가능하다.


나는 jboss 계정으로 기동이 필요하여 아래 조치를 취했다.




 

chown root:jboss httpd

$ chmod +s httpd



 

$ ./apachectl start

httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.149.130 for ServerName

$

$

$ ps -ef | grep -i httpd

root     21454     1  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

daemon   21455 21454  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

daemon   21456 21454  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

daemon   21457 21454  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

daemon   21458 21454  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

daemon   21459 21454  0 03:15 ?        00:00:00 /jboss/apache/bin/httpd -k start

jboss    21461 21423  0 03:15 pts/0    00:00:00 grep -i httpd



일반계정으로 해야 하는 경우


$ /etc/sudoers 수정

jboss all:(ALL)


및 


apache/conf/httpd.conf 수정

user jboss

group jboss


댓글