thttpd is a simple, small, portable, fast, and secure HTTP server.
- Simple: It handles only the minimum necessary to implement HTTP/1.1.
- Small: It also has a very small run-time size, since it does not fork
and is very careful about memory allocation.
- Portable: It compiles cleanly on SunOS 4.1.x, Solaris 2.x, BSD/OS 2.x,
Linux 1.2.x, and OSF/1 (on a 64-bit Alpha).
- Fast: In typical use it's about as fast as the best full-featured
servers (Apache, NCSA, Netscape). Under extreme load it's much faster.
- Secure: It goes to great lengths to protect the web server machine
against attacks and breakins from other sites.
It also has one extremely useful feature (URL-traffic-based throttling) that
no other server currently has.
===> The following configuration options are available for thttpd-2.29_1:
FLUSH_LOG=on: fflush() the log file after each request
HTACCESS=off: IP-based authorization (.htaccess) support
INDEXES=off: Generate index pages for directories
LOG_UNKNOWN=off: Log unknown request headers
REAL_IP=on: Respect (pass on) "X-Forwarded-For" header
SENDFILE=on: Use sendfile(2) to serve files
STATS=on: Collect internal stats and print to system log
===> Use 'make config' to modify these settings
Override GNU_CONFIGURE_MANPREFIX in my GNU autotools-based ports
This is a temporary measure to facilitate entering the new world
order where manual pages are installed under ${PREFIX}/share/man.
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
www: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
*
* <hvo.pm@xs4all.nl>
* Aaron Dalton <aaron@FreeBSD.org>
* Aaron Dalton <aaron@daltons.ca>
* Aaron LI <aly@aaronly.me>
* Aaron Zauner <az_mail@gmx.at>
* Abel Chow <achow@transoft.net>
* Adam Weinberger <adamw@FreeBSD.org>
* Ade Lovett <ade@FreeBSD.org>
* Adrian Steinmann <ast@marabu.ch>
* Akinori MUSHA aka knu <knu@idaemons.org>
(Only the first 15 lines of the commit message are shown above )
In r377229, the REAL_IP patch from NginX was added that puts X-Forwarded-For
into Remote-Addr. That cripples IPv6 ready software to IPv4 only, let's try
to fix this.
PR: 230382
Submitted by: bz
Update `www/thttpd' to version 2.29, which now allows CGI to handle HTTP
methods besides GET/HEAD/POST (namely PUT, DELETE, and TRACE).
Found out via: repology.org
Ignored by: portscout :(
Update `www/thttpd' to version 2.28, which features:
- Improvements to the FreeBSD startup script (Craig Leres)
- Minor portability tweak in mmc.c
- Fix a potential buffer overrun bug in htpasswd (reported
by Alessio Santoru as CVE-2017-17663), no-op on FreeBSD
due to our custom patches from Red Hat since r377324
PR: 225701
Add two more configuration options (defaults were not changed):
- LOG_UNKNOWN: whether to log unknown request headers. Most sites will not
want to log them, which will save them a bit of CPU time;
- FLUSH_LOG: whether to fflush() the log file after each request. If this
is turned off there's a slight savings in CPU cycles.
- Make thttpd's collecting of internal stats and printing them to system
log every hour optional, because apparently some users do not want it
- Convert to option helper targets (post-patch-FOO-off) while here, which
allows us to remove `.include <bsd.port.options.mk>'
PR: 200884
Another attempt to make `www/thttpd' multiple make(1) jobs (-jX) safe.
During the build process there is one case when parts (source files) are
located in different directories and then linked together. Dependencies
are specified seemingly correctly, but the problem is that the build rule
`$(CC) $(CFLAGS) -c $*.c' loses information about source file path due to
how `$*' is expanded ("no suffix or preceding directory components") and
does not specify output object path.
Change it to more robust and correct `$(CC) $(CFLAGS) -o $@ -c $<' as a
remedy. Since this is BSD syntax, remove `gmake' from USES.
Tested by: marino (looks good, but not a complete guarantee)
- Update `www/thttpd' to version 2.27 [1]
- Install logfile rotation rule to prevent people running out of space
in their /var partitions [2]
- Provide an optional patch for IP-based authorization (.htaccess) [3]
- While here, do not capitalize `Web' in the middle of the sentence
inside `files/pkg-message.in' as it looks like a relic of the 1990s
PR: 210040 [1]
Submitted by: phk [2]
Obtained from: http://ogris.de/thttpd/ [3]
- Fix patch after rerolled distfile [1]
- Mark MAKE_JOBS_UNSAFE, tries to use object file before it's built (cc:
match.o: No such file or directory)
Suggested by: adamw [1]
Approved by: portmgr blanket
- Update to version 2.26 and cleanup MASTER_SITES; define LICENSE
- Change default WWW root from ${PREFIX}/www/data to more expected (and
standard) ${WWWDIR} (${PREFIX}/www/thttpd) and default CGI pattern to
"/cgi-bin/*" since this goes better in line with default installation
- Enable IPREAL option by default (do not convert it to unconditional
patch as it could lead to privacy violation, which might be unwanted)
- Change served data default MIME type to "application/octet-stream"
- Rename thttpdpasswd(1) and its manpage to thtpasswd(1); this not just
makes it shorter, but is more consistent with what popular GNU/Linux
distributions do
- Stop generating index pages for directories by default for security
reasons, provide an option for that
- Properly stagify port by patching upstream makefiles instead of doing
entire installation by hand (and thus retire `do-install' target)
- Adjust and sort pkg-plist in accordance with the the above changes
Bring another several patches from Gentoo and Red Hat (also relevant to the
upcoming 2.26):
- Fix potential buffer overflow in expand_symlinks() function of libhttpd.c
- Better handling of tempfile and additional input validation in htpasswd(1)
- Make sure that the logfile is created or reopened as read/write by thttpd
(www) user only (modified to allow group read access as well so web admin
won't have to su(1) to super-user or "www" to be able to read logs) [1]
Bump port revision to account for these and previous changes.
Gentoo bug: 458896 [1]
Security: CVE-2013-0348 [1]
In sight of upcoming update, merge a few things to get cleaner diffs:
- Add a patch for CVE-2005-3124 (courtesy of Red Hat?)
- By default thttpd doesn't respect (or pass on) the X-Forwarded-For
header; use a patch [1] that puts X-Forwarded-For into Remote-Addr,
but not enable it just yet
- Amend COMMENT, improve pkg-message, sort the knobs in Makefile, and
reformat port description text for better readability while here
[1] http://wiki.nginx.org/ThttpdRealIP
- Try to fix parallel builds (-jX) by using GNU make(1)
- Convert sendfile(2) support into an OPTION (keep it on)
- Rearrange things in Makefile a bit while I'm here
Unbreak. Don't include the unversioned notes.html file, and instead
put a note about it into the pkg-message.
While here, STAGE, use @sample, and rename patch-xy's.
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
- thttpd.conf is not a requirement; the CLI will suffice.
PR: ports/137924
Submitted by: Nick Hibma <nick@van-laarhoven.org>
Approved by: maintainer timeout (danfe ; 380 days)
Do not log sendfile calls that return with ENOTCONN when USE_SENDFILE is
used, it is not interesting.
Bump PORTREVISION.
PR: ports/91843
Submitted by: Ben Goetter <goetter@mazama.net>
Rename htpasswd program to thttpdpasswd, some people might actually
want to install different webservers at the same time. Reflected in man
pages.
PR: ports/112954
Previously thttpd specified to start before /etc/rc.d/ldconfig, which has
an issue - one can easily need /etc/rc.d/ldconfig to run first. So rather
than require 'SERVERS' and forcing to run before 'DAEMON', simply depend
on 'DAEMON'. (which is really to gate "servers" like httpd, ftpd, etc..)
Approvedby: anders@FreeBSD.org
Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.
We have not checked for this KEYWORD for a long time now, so this
is a complete noop, and thus no PORTREVISION bump. Removing it at
this point is mostly for pedantic reasons, and partly to avoid
perpetuating this anachronism by copy and paste to future scripts.
Use RC_SUBR instead of thttpd_wrapper.
Use WWWOWN instead of nobody.
Clean up Makefile using SUB_FILES, SUB_LIST and PORTDOCS.
Etc.
PR: 72298
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>, vs/flz
Use ${ECHO_CMD} instead of ${ECHO} where you mean the echo command; the ECHO
macro is set to "echo" by default, but it is set to "true" if make(1) is
invoked with the -s option while ECHO_CMD is always set to the echo command.
Fix checksum. This isn't my port, so I don't know why it was wrong. Nor do I
have the file that the bad checksum was generated from. Maybe it was never
right.
- On startup, /etc/rc procedure stops when thttpd is installed. *
${PREFIX}/etc/rc.d/thttpd.sh does not return. * FIX: invoke thttpd_wrapper
as a background process. - On shutdown, Message "No processes matching
``thttpd_wrapper''" is shown. * thttpd_wrapper is actually a shell script,
not an executable. * FIX: Record the pid of thttpd_wrapper to /var/run.
* FIX: Use pid-file when killing the wrapper.
As threatened on freebsd-ports: all startup scripts know about the two options
`start' and `stop' now (unless I have forgotten any). This allows us to call
the scripts from /etc/rc.shutdown with the correct option.