thttpd配置

thttpd的配置文件 /etc/thttpd/thttpd.conf也很简单
=========================================
#------------------------------------------------------------------------------#
# thttpd version 2.23beta1 #
# Main configuration file #
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Port: portnum
# Sets the port number which will be listened by thttpd.
# Default: 80
#这里设置侦听的端口,不需要改动
port=80

# chroot/nochroot
# Sets whether thttpd will chroot after starting.
# Default: nochroot
# 设置是否chroot,不需要改动
chroot

# user: userid
# Specified which user to switch after intialiazation when started as root.
# Default: www-data
# 设置用户的ID,不需要改动
user=www-data

# host: hostname
# Specifies a hostname to bind to.
# Default: Bind to all supported hostnames on the local machine.
# 设置主机名
#host=grugler

# Logfile: logfile path
# Specifies a file for logging.
# Default: Log via syslog()
# 设置日志文件的位置
logfile=/var/log/thttpd.log

# throttles: file
# Specifies a file of throttle settings.
# Default: /etc/thttpd/throttle.conf
# 设置限流的配置文件名
throttles=/etc/thttpd/throttle.conf

# urlpat: pattern
# Specifies which URL can only be only be accessed from the local server.


# Default: None
# urlpat=*.mpeg|*. MP3 |*.wav|*.gz|*.jpg|*.gif

# dir: directory
# Specifies a directory to chdir() to after thttpd starts.
# This directory will most likely be the directory you will be serving your
# clients from.
# Default: `cwd`
# 这里设置web server的根目录
dir=/var/www

# cgipat: pattern
# Specifies which URL may contain executable CGI files.
# Default: None
cgipat=/cgi-bin/*
=================================================

限流配置文件的配置更简单,大家看看注释就明白了,一秒钟的最大流量为3000个字节
=================================================
# Format:
# <pattern> <number>
#

#* 3000 # Only devote 3000 bytes per second to our dialup

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值