首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行小型httpd serveron linux

运行小型httpd serveron linux
EN

Stack Overflow用户
提问于 2022-02-05 12:55:22
回答 2查看 285关注 0票数 0

我刚在linux上安装了迷你httpd。但不能在浏览器上连接到localhost / 127.0.0.1

服务器正在工作

mini-httpd.service - LSB: mini-httpd启动脚本加载: loaded (/etc/init.d/mini-httpd;生成) Active: active (exited),自Sat 2022-02-05 14:33:10 EET;6分钟前Docs: man:systemd生成器(8)进程: 6236 ExecStart=/etc/init.d/mini-httpd start (code=exited,status=0/SUCCESS)

这是配置文件

代码语言:javascript
复制
# 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
EN

回答 2

Stack Overflow用户

发布于 2022-02-05 13:05:27

使用

代码语言:javascript
复制
apk add curl
curl http://localhost

测试web服务器。

参见此维基

票数 0
EN

Stack Overflow用户

发布于 2022-04-19 12:36:51

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

代码语言:javascript
复制
# 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 make中

代码语言:javascript
复制
START=1
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70998227

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档