App::HTTPThis: the tiny web server I keep reaching for
Source: Dev.to

Why I’ve used it for years
Static sites are deceptively simple… right up until they aren’t.
- You want to check that relative links behave the way you think they do.
- You want to confirm your CSS and images are loading with the paths you expect.
- You want to reproduce “real HTTP” behaviour (caching headers, MIME types, directory handling) rather than viewing files directly from disk.
Sure, you can open file:///.../index.html in a browser, but that’s not the same thing as serving it over HTTP. And setting up Apache (or friends) feels like bringing a cement mixer to butter some toast.
With http_this, the workflow is basically:
cdinto your site directory- Run a single command
- Open a URL
- Get on with your life
It’s the “tiny screwdriver” that’s always on my desk.
Why I took it over
A couple of years ago, the original maintainer (entirely reasonably!) became too busy elsewhere and the distribution wasn’t getting attention. That happens—open‑source is like that.
But I was using App::HTTPThis regularly, and I had an itch I wanted to scratch: auto‑index pages.
When you’re serving a directory tree for testing, you often want to click around directories that don’t have an index.html. A basic listing is fine, but a useful listing is better. So I took over maintenance to make the tool slightly more pleasant in the way I actually used it.
If you want to read more about this story, see my two blog posts:
What I’ve done since taking it over
Most of the changes are about making the “serve a directory” experience smoother, without turning it into a kitchen‑sink web server.
1️⃣ Index pages (auto‑index)
The first big improvement was adding directory index pages so that when you hit a directory without an index.html, you don’t just get an error—you get a listing.
That sounds minor, but it turns a “quick test server” into “I can navigate this like a real site”.
2️⃣ Prettier index pages
Then I did the obvious follow‑up: make those indexes nicer to read.
When you’re clicking around a directory tree, you don’t want to squint at a wall of plain links. A bit of structure goes a long way: clearer layout, sensible ordering, and a page that feels like a tool you’d happily use all day.
3️⃣ A config file
Once you’ve used a tool for a while, you start to realise you run it the same way most of the time.
A config file lets you keep your common preferences in one place instead of re‑typing options. It preserves the “one command” feel, but gives you repeatability when you want it.
4️⃣ --host option
The ability to control the host binding sounds like an edge case—until it isn’t.
- Only
localhostaccess for safety - Access from other devices on your network (phone/tablet testing)
- Behaviour that matches a particular environment
A --host option gives you that control without adding complexity to the default case.
The Bonjour feature (and what it’s for)
This is the part I only really appreciated recently: App::HTTPThis can advertise itself on your local network using mDNS / DNS‑SD—commonly called Bonjour on Apple platforms, Avahi on Linux, and various other names depending on who you’re talking to.
It’s switched on with the --name option:
http_this --name MyService
When you do that, http_this publishes an _http._tcp service on your local network with the instance name you chose (MyService in this case). Any device on the same network that understands mDNS/DNS‑SD can then discover it and resolve it to an address and port, without you having to tell anyone, “go to http://192.168.1.23:7007/”.
Confession time: I ignored this feature for ages because I mentally filed it under “Apple‑only magic” (Bonjour! very shiny! probably proprietary!). It turns out it’s not Apple‑only at all; it’s a set of standard networking technologies that are supported on pretty much everything, just under a frankly ridiculous number of different names. So: not Apple magic, just local‑network service discovery with a branding problem.
Because I’d never really used it, I finally sat down and tested it properly after someone emailed me about it last week, and it worked nicely—nice enough that I’ve now added a BONJOUR.md file to the repo with a practical explanation of what’s going on, how to enable it, and a few ways to browse/discover the advertised service.
Related tools in the same family
App::HTTPThis is part of a little ecosystem of “run a thing here quickly” command‑line apps. If you like the shape of http_this, you might also want to look at these siblings:
- https_this – like
http_this, but served over HTTPS (useful when you need to test secure contexts, service workers, APIs that require HTTPS, etc.) - cgi_this – for quick CGI‑style testing without setting up a full web‑server stack.
- dav_this – serves content over WebDAV (handy for testing clients or workflows that expect DAV).
- ftp_this – a quick FTP server for those rare‑but‑real moments when you need one.
They all share the same basic philosophy: remove the friction between “I have a directory” and “I want to interact with it like a service”.
Wrapping up
I like tools that do one job, do it well, and get out of the way. App::HTTPThis has been that tool for me for years and it’s been fun (and useful) to nudge it forward as a maintainer.
If you’re doing any kind of static‑site work — docs sites, little prototypes, generated output, local previews — it’s worth keeping in your toolbox.
And if you’ve got ideas, bug reports, or platform notes (especially around Bonjour/Avahi weirdness), I’m always happy to hear them.
The post App::HTTPThis: the tiny web server I keep reaching for first appeared on Perl Hacks.
