【问题标题】:Run mini-httpd serveron linux在 linux 上运行 mini-http 服务器
【发布时间】:2022-02-05 12:55:22
【问题描述】:

我刚刚在 linux mint 上安装了 mini-httpd。 但无法连接到浏览器上的 localhost / 127.0.0.1


服务器正在工作

● mini-httpd.service - LSB:mini-httpd 启动脚本 已加载:已加载(/etc/init.d/mini-httpd; 已生成) 活动:自 2022 年 2 月 5 日星期六 14:33:10 EET 起活动(退出); 6分钟前 文档:man:systemd-sysv-generator(8) 进程:6236 ExecStart=/etc/init.d/mini-httpd start (code=exited, status=0/SUCCESS)

这是配置文件

# Example config for mini_httpd.
# Author: Marvin Stark <marv@der-marv.de>
# Author-Update: 2015 Jose dos Santos Junior <j.s.junior@live.com>
# Description Update: Changed the default document root (data_dir)/var/www/html
# Last-Update: 2015-09-05

# Uncomment this line for turning on ssl support.
#ssl

# On which host mini_httpd should bind?
host=localhost

# On which port mini_httpd should listen?
port=80

# Which user mini_httpd should use?
user=nobody

# Run in chroot mode?
#chroot # yes
nochroot # no

# Working directory of mini_httpd.
#dir=<work_dir>

# We are the web files stored?
# Please change this to your needs.
data_dir=/var/www/html

# CGI path
cgipat=cgi-bin/*

# Which certificate to use?
#certfile=<certfile>

# Which logfile to use?
logfile=/var/log/mini_httpd.log

# Which pidfile to use?
pidfile=/var/run/mini_httpd.pid

# Which charset to use?
charset=iso-8859-1

【问题讨论】:

    标签: server mini-httpd


    【解决方案1】:

    使用

    apk add curl
    curl http://localhost
    

    测试网络服务器。

    看到这个Wiki

    【讨论】:

      【解决方案2】:

      在配置文件中进行以下更改

      # On which host mini_httpd should bind?
      # host=localhost
      
      # Which user mini_httpd should use?
      # user=nobody
      
      # Run in chroot mode?
      chroot # yes
      # nochroot # no
      

      在 etc/default/mini-httpd 中制作

      START=1
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-09-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-05-01
        相关资源
        最近更新 更多