0

按照本指南 ,我使用 termux 和 anlinux 在 android 上安装 Ubuntu 和 apache2。但是当我运行 'apachetcl start' 时,我得到了这个错误:

root@localhost:~# apachectl start
/usr/sbin/apachectl:  99: ulimit: error setting limit (Operation not permitted)
Setting ulimit failed. See README.Debian for more information.
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down AH00015: Unable to open logs 
Action 'start' failed. The Apache error log may have more information.
4

2 回答 2

0

为了解决这个问题,将文件编辑/etc/apache2/ports.conf到这个:

Listen 1024 # You can change the port from 80 to 1024 or greater
<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

然后将上面的代码保存到,您可以使用Vim编辑器、Nano编辑器或其他任何东西 /etc/apache2/ports.conf编辑该文件。 保存文件后,使用以下命令运行 apache2: 或:


sudo service apache2 restart


sudo /etc/init.d/apache2 restart

注意:如果您没有安装 sudo,您可以通过以下方式安装它: apt install sudo

于 2020-08-09T15:51:42.687 回答
0

只需从 playstore 安装 termux 和命令并从喜欢的网络浏览器termux-setup-storage apt update apt install apache2 apachectl -k start 检查http://127.0.01:8080

于 2019-10-20T18:25:42.233 回答