lighttpd не может подключиться к порту: в доступе отказано

2589
Daniel Wilson
$ sudo service lighttpd start Starting lighttpd:  2016-02-29 09:51:24: (network.c.410) can't bind to port: 88 Permission denied [FAILED] 

у /etc/lighttpd/lighttpd.confменя есть:

var.log_root = "/var/log/lighttpd" var.server_root = "/var/www/lighttpd" var.state_dir = "/var/run" var.home_dir = "/var/www/html/eboardit/static" var.conf_dir = "/etc/lighttpd"  ####################################################################### ## ## Basic Configuration ## --------------------- ## server.port = 88  ## ## Use IPv6? ## server.use-ipv6 = "disable" 

Я понимаю, что был очень похожий вопрос 4 года назад, но на него не было ответа. lighttpd не может связать разрешение на доступ к порту

Я пробовал пару разных портов. На что мне смотреть? какое разрешение требуется для привязки к порту?

Спасибо!

0

1 ответ на вопрос

1
RedGrittyBrick

It is unusual to get a "Permission denied" message when running a command using sudo. I might check that SELinux isn't installed/enabled.

The usual reason a network service fails to bind to a port is because the TCP port is already in use by some other service. The usual way to check this is

$ sudo netstat -plnt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 :::80 :::* LISTEN 3944/httpd tcp 0 0 :::22 :::* LISTEN 3834/sshd tcp 0 0 :::443 :::* LISTEN 3944/httpd 

Here we can see that port 80 is already in use by the httpd program.

If there is a better explanation, someone will be along soon to downvote this answer and post a more useful one :-)

Вы правы! SELinux ограничивал вещи. Вот еще один источник. https://visibilityspots.org/selinux.html Но SELinux разрешил использовать 81 ... так что переключение на 81 сработало. Daniel Wilson 8 лет назад 0

Похожие вопросы