darkhttpd php,推荐轻量级的http服务器darkhttpd

https://unix4lyfe.org/darkhttpd/

特点:单进程命令行即可启动,无需配置。

darkhttpd/1.10, copyright (c) 2003-2014 Emil Mikulic.

usage: ./darkhttpd /path/to/wwwroot [flags]

flags: --port number (default: 8080, or 80 if running as root)

Specifies which port to listen on for connections.

Pass 0 to let the system choose any free port for you.

--addr ip (default: all)

If multiple interfaces are present, specifies

which one to bind the listening port to.

--maxconn number (default: system maximum)

Specifies how many concurrent connections to accept.

--log filename (default: stdout)

Specifies which file to append the request log to.

--chroot (default: don't chroot)

Locks server into wwwroot directory for added security.

--daemon (default: don't daemonize)

Detach from the controlling terminal and run in the background.

--index filename (default: index.html)

Default file to serve when a directory is requested.

--mimetypes filename (optional)

Parses specified file for extension-MIME associations.

--uid uid/uname, --gid gid/gname (default: don't privdrop)

Drops privileges to given uid:gid after initialization.

--pidfile filename (default: no pidfile)

Write PID to the specified file. Note that if you are

using --chroot, then the pidfile must be relative to,

and inside the wwwroot.

--no-keepalive

Disables HTTP Keep-Alive functionality.

--forward host url (default: don't forward)

Web forward (301 redirect).

Requests to the host are redirected to the corresponding url.

The option may be specified multiple times, in which case

the host is matched in order of appearance.

--no-server-id

Don't identify the server type in headers

or directory listings.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 OpenWrt 上使用 Valgrind 需要注意以下几点: 1. 安装 Valgrind 可以通过 opkg 安装 Valgrind: ``` opkg update opkg install valgrind ``` 2. 配置 Valgrind 默认情况下,Valgrind 会使用 glibc 库,而 OpenWrt 中使用的是 uClibc 库,因此需要手动配置 Valgrind。 首先,需要创建一个文件 `/etc/valgrindrc`,并添加以下内容: ``` # Valgrind configuration file for uClibc libc-libraries: /lib/libuClibc-*.so.* ``` 然后,在运行 Valgrind 时,需要指定使用该配置文件: ``` valgrind --tool=memcheck --vgdb=no --trace-children=yes --num-callers=20 --suppressions=/usr/lib/valgrind/uClibc.supp --read-var-info=yes --malloc-fill=0xFE --free-fill=0xEF --leak-check=full --show-reachable=yes --track-origins=yes --log-file=/tmp/valgrind.log --error-limit=no --undef-value-errors=no --gen-suppressions=all --fair-sched=yes --quiet --trace-children=yes --trace-children-skip=*dhclient* --trace-children-skip=*udhcpc* --trace-children-skip=*pppd* --trace-children-skip=*klogd* --trace-children-skip=*syslogd* --trace-children-skip=*hotplug2* --trace-children-skip=*ntpd* --trace-children-skip=*odhcpd* --trace-children-skip=*dnsmasq* --trace-children-skip=*hostapd* --trace-children-skip=*wpa_supplicant* --trace-children-skip=*ubusd* --trace-children-skip=*logd* --trace-children-skip=*smbd* --trace-children-skip=*nmbd* --trace-children-skip=*irqbalance* --trace-children-skip=*procd* --trace-children-skip=*crond* --trace-children-skip=*ubus* --trace-children-skip=*ubusd* --trace-children-skip=*uhttpd* --trace-children-skip=*amule* --trace-children-skip=*transmission* --trace-children-skip=*minidlna* --trace-children-skip=*mjpg_streamer* --trace-children-skip=*sshd* --trace-children-skip=*swapon* --trace-children-skip=*swapoff* --trace-children-skip=*fstab* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*tar* --trace-children-skip=*rsync* --trace-children-skip=*scp* --trace-children-skip=*sftp* --trace-children-skip=*ftpd* --trace-children-skip=*ftp* --trace-children-skip=*telnetd* --trace-children-skip=*ssh* --trace-children-skip=*tftp* --trace-children-skip=*httpd* --trace-children-skip=*vnstatd* --trace-children-skip=*ntfs-3g* --trace-children-skip=*samba* --trace-children-skip=*proftpd* --trace-children-skip=*lighttpd* --trace-children-skip=*php* --trace-children-skip=*mysql* --trace-children-skip=*sqlite3* --trace-children-skip=*redis* --trace-children-skip=*memcached* --trace-children-skip=*mosquitto* --trace-children-skip=*influxd* --trace-children-skip=*grafana-server* --trace-children-skip=*postgresql* --trace-children-skip=*mongodb* --trace-children-skip=*cupsd* --trace-children-skip=*dovecot* --trace-children-skip=*nginx* --trace-children-skip=*php-fpm* --trace-children-skip=*thttpd* --trace-children-skip=*dnscrypt-proxy* --trace-children-skip=*tor* --trace-children-skip=*tinyproxy* --trace-children-skip=*privoxy* --trace-children-skip=*squid* --trace-children-skip=*polipo* --trace-children-skip=*darkhttpd* --trace-children-skip=*kamailio* --trace-children-skip=*opensips* --trace-children-skip=*asterisk* --trace-children-skip=*freeswitch* --trace-children-skip=*nagios* --trace-children-skip=*nrpe* --trace-children-skip=*collectd* --trace-children-skip=*snmpd* --trace-children-skip=*openvpn* --trace-children-skip=*pptpd* --trace-children-skip=*strongswan* --trace-children-skip=*xl2tpd* --trace-children-skip=*pppoe-server* --trace-children-skip=*pppoe-relay* --trace-children-skip=*pppoe* --trace-children-skip=*ppp* --trace-children-skip=*rtorrent* --trace-children-skip=*transmission-daemon* --trace-children-skip=*darkstat* --trace-children-skip=*vnstat* --trace-children-skip=*iptraf-ng* --trace-children-skip=*tcpdump* --trace-children-skip=*wireshark* --trace-children-skip=*snort* --trace-children-skip=*sflowtool* --trace-children-skip=*sflow-rt* --trace-children-skip=*ntopng* --trace-children-skip=*openvswitch* --trace-children-skip=*kmod* --trace-children-skip=*iptables* --trace-children-skip=*ip6tables* --trace-children-skip=*ipset* --trace-children-skip=*ulogd* --trace-children-skip=*dhcp6c* --trace-children-skip=*dhcp6s* --trace-children-skip=*wide-dhcpv6* --trace-children-skip=*radvd* --trace-children-skip=*6relayd* --trace-children-skip=*odhcp6c* --trace-children-skip=*odhcpd-dhcpv6* --trace-children-skip=*ip6tables-save* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-save* --trace-children-skip=*iptables-restore* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-restore* --trace-children-skip=*logrotate* --trace-children-skip=*sysupgrade* --trace-children-skip=*jffs2dump* --trace-children-skip=*ubiformat* --trace-children-skip=*ubiupdatevol* --trace-children-skip=*ubiattach* --trace-children-skip=*ubidetach* --trace-children-skip=*ubimkvol* --trace-children-skip=*ubirmvol* --trace-children-skip=*ubirename* --trace-children-skip=*ubiupdatevol* --trace-children-skip=*ubiblock* --trace-children-skip=*ubinize* --trace-children-skip=*ubi* --trace-children-skip=*mtd* --trace-children-skip=*dd* --trace-children-skip=*fdisk* --trace-children-skip=*parted* --trace-children-skip=*mkfs* --trace-children-skip=*mkswap* --trace-children-skip=*mkfs.ext3* --trace-children-skip=*mkfs.ntfs* --trace-children-skip=*mkfs.vfat* --trace-children-skip=*mkfs.xfs* --trace-children-skip=*mkfs.jffs2* --trace-children-skip=*mkfs.ubifs* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*mount* --trace-children-skip=*umount* --trace-children-skip=*fsck* --trace-children-skip=*fsck.ext3* --trace-children-skip=*fsck.ntfs* --trace-children-skip=*fsck.vfat* --trace-children-skip=*fsck.xfs* --trace-children-skip=*fsck.jffs2* --trace-children-skip=*fsck.ubifs* --trace-children-skip=*e2label* --trace-children-skip=*ntfslabel* --trace-children-skip=*dosfslabel* --trace-children-skip=*xfs_admin* --trace-children-skip=*jffs2* --trace-children-skip=*mke2fs* --trace-children-skip=*ntfs-3g.probe* --trace-children-skip=*ntfs-3g.secaudit* --trace-children-skip=*ntfs-3g.usermap* --trace-children-skip=*ntfs-3g* --trace-children-skip=*mount.ntfs-3g* --trace-children-skip=*mount.ntfs* --trace-children-skip=*udhcpc* --trace-children-skip=*dhclient* --trace-children-skip=*dhcpd* --trace-children-skip=*dnsmasq* --trace-children-skip=*hostapd_cli* --trace-children-skip=*wpa_cli* --trace-children-skip=*wpa_supplicant* --trace-children-skip=*pppd* --trace-children-skip=*pptp* --trace-children-skip=*l2tpd* --trace-children-skip=*openconnect* --trace-children-skip=*openvpn* --trace-children-skip=*strongswan* --trace-children-skip=*xl2tpd* --trace-children-skip=*pppoe-server* --trace-children-skip=*pppoe-relay* --trace-children-skip=*pppoe* --trace-children-skip=*ppp* --trace-children-skip=*smbd* --trace-children-skip=*nmbd* --trace-children-skip=*nmblookup* --trace-children-skip=*smbclient* --trace-children-skip=*smbpasswd* --trace-children-skip=*smbstatus* --trace-children-skip=*smbtree* --trace-children-skip=*wins* --trace-children-skip=*samba-tool* --trace-children-skip=*transmission* --trace-children-skip=*transmission-daemon* --trace-children-skip=*amule* --trace-children-skip=*aria2c* --trace-children-skip=*wget* --trace-children-skip=*curl* --trace-children-skip=*ftp* --trace-children-skip=*scp* --trace-children-skip=*sftp* --trace-children-skip=*rsync* --trace-children-skip=*tar* --trace-children-skip=*tftp* --trace-children-skip=*telnet* --trace-children-skip=*ssh* --trace-children-skip=*sftp-server* --trace-children-skip=*ftp-proxy* --trace-children-skip=*proxsmtp* --trace-children-skip=*spamassassin* --trace-children-skip=*fetchmail* --trace-children-skip=*dovecot* --trace-children-skip=*postfix* --trace-children-skip=*exim* --trace-children-skip=*sendmail* --trace-children-skip=*nginx* --trace-children-skip=*apache2* --trace-children-skip=*lighttpd* --trace-children-skip=*php* --trace-children-skip=*mysql* --trace-children-skip=*postgresql* --trace-children-skip=*mosquitto* --trace-children-skip=*influxd* --trace-children-skip=*grafana-server* --trace-children-skip=*memcached* --trace-children-skip=*redis* --trace-children-skip=*mongodb* --trace-children-skip=*cupsd* --trace-children-skip=*darkhttpd* --trace-children-skip=*dnscrypt-proxy* --trace-children-skip=*tor* --trace-children-skip=*tinyproxy* --trace-children-skip=*privoxy* --trace-children-skip=*squid* --trace-children-skip=*polipo* --trace-children-skip=*kamailio* --trace-children-skip=*opensips* --trace-children-skip=*asterisk* --trace-children-skip=*freeswitch* --trace-children-skip=*nagios* --trace-children-skip=*nrpe* --trace-children-skip=*collectd* --trace-children-skip=*snmpd* --trace-children-skip=*openvswitch* --trace-children-skip=*iptables* --trace-children-skip=*ip6tables* --trace-children-skip=*ipset* --trace-children-skip=*ulogd* --trace-children-skip=*dhcp6c* --trace-children-skip=*dhcp6s* --trace-children-skip=*wide-dhcpv6* --trace-children-skip=*radvd* --trace-children-skip=*6relayd* --trace-children-skip=*odhcp6c* --trace-children-skip=*odhcpd-dhcpv6* --trace-children-skip=*ip6tables-save* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-save* --trace-children-skip=*iptables-restore* --trace-children-skip=*ip6tables-restore* --trace-children-skip=*iptables-restore* --trace-children-skip=*logrotate* --trace-children-skip=*sysupgrade* --trace-children-skip=*opkg* ``` 这里的参数根据需求来调整。 3. 运行 Valgrind 使用 `valgrind` 命令即可运行 Valgrind,例如: ``` valgrind --tool=memcheck --leak-check=full myprogram arg1 arg2 ``` 这里的 `myprogram` 是需要测试的程序,`arg1`、`arg2` 是该程序的参数。 注意:Valgrind 会对程序的运行速度有一定的影响,因此在测试时需要对程序进行压力测试,以确保测试结果的准确性。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值