'Run mini-httpd serveron linux

i just installed mini-httpd on linux mint. but can'n connect to localhost / 127.0.0.1 on browser


server is working

● mini-httpd.service - LSB: mini-httpd start script Loaded: loaded (/etc/init.d/mini-httpd; generated) Active: active (exited) since Sat 2022-02-05 14:33:10 EET; 6min ago Docs: man:systemd-sysv-generator(8) Process: 6236 ExecStart=/etc/init.d/mini-httpd start (code=exited, status=0/SUCCESS)

and this is the config file

# Example config for mini_httpd.
# Author: Marvin Stark <[email protected]>
# Author-Update: 2015 Jose dos Santos Junior <[email protected]>
# 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


Solution 1:[1]

Use

apk add curl
curl http://localhost

to test the web server.

see this Wiki

Solution 2:[2]

Make following changes in config file

# 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

In etc/default/mini-httpd make

START=1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 navylover
Solution 2 Amrit Prasad