【问题标题】:Running apache on android with termux and anlinux使用 termux 和 anlinux 在 android 上运行 apache
【发布时间】:2019-08-30 05:29:20
【问题描述】:

关注this guide 我使用 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.

【问题讨论】:

    标签: android apache port ulimit termux


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      为解决此问题,请将/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>
      

      然后将上述代码保存到/etc/apache2/ports.conf,您可以使用Vim 编辑器、Nano 编辑器或其他任何方式编辑该文件。

      保存文件后,使用以下命令运行 apache2:
      sudo service apache2 restart

      或者 :
      sudo /etc/init.d/apache2 restart

      注意:如果你没有安装 sudo,你可以通过: apt install sudo

      安装它

      【讨论】:

        猜你喜欢
        • 2022-11-19
        • 2020-09-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多