Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Lightweight Server for Static "Sorry for the Inconvenience" Webpage?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Lightweight Server for Static "Sorry for the Inconvenience" Webpage?

emgemg Veteran

I would like to set up a small server in a virtual machine. It would take the same internal IP address as our production server, but the two servers would never run at the same time.

The only thing that this lightweight server must do is display a static webpage. It would display a message (possibly with a graphic) saying, "The system is down for routine maintenance. Sorry for the inconvenience." or something like that.

I am looking for recommendations for a simple distro and web server for a virtual machine with the following requirements:

  • Absolutely secure. It should accept no outside input, other than from the virtual machine console on the host computer.
  • Small
  • Easy to install, configure, manage, and maintain.

Which distro and web server do you recommend for my lightweight virtual machine web server?

Comments

  • rm_rm_ IPv6 Advocate, Veteran

    For a web server, check out:

    For a distro, Debian minimal should be fine, although I'd suggest removing systemd. Both of those web servers are in Debian's standard repo as well.

  • rocketrocket Member

    Debian minimal and NGINX?

  • FritzFritz Veteran
    edited June 2017

    Get Hiawatha.

  • Debian + Caddy.

  • raindog308raindog308 Administrator, Veteran

    Github pages or S3 or even Dropbox.

    All can serve static pages. No real need for a VPS here, is there?

    I know you're planning to use this as an fill-in for a production server but periodically repointing DNS might be easier than maintaining a VPS.

    rocket said: Debian minimal and NGINX?

    Serving static pages is indeed what nginx does best.

  • Nginx is simple enough.

  • Lightweight ? Tuxlite

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    darkhttpd is literally a single .c file and is perfect for serving static content. Super fast, uses a couple megs of RAM, no special libraries required.

    Francisco

    Thanked by 4netomx ehab scaveney Fusl
  • sinsin Member

    Hiawatha!

  • angstromangstrom Moderator

    @sin said:
    Hiawatha!

    Doesn't Hiawatha require PolarSSL? Which is a bit of a nuisance.

    I would recommend bozohttpd, which is the default web server on NetBSD:

    http://www.eterna.com.au/bozohttpd/

  • bsdguybsdguy Member

    I like hiawatha, it's a really fine and relatively small httpd. In this case, however, I'd go with @rm_. Something like that is best, cheapest and most secure served by a simple static server. acme's mini httpd is a good (and quite well reputed) example.

    Maybe darkhttpd recommended by @Francisco is even better for you because with minihttpd you need to wire the content into the executable (iirc) while darkhttpd works with external content files (as do most web servers) and is hence more flexible.

    Thanked by 1netomx
  • rm_rm_ IPv6 Advocate, Veteran

    bsdguy said: darkhttpd recommended by Francisco is even better for you

    I'd say it has a fatal flaw of not being in Debian's repositories, which means you have to obtain and compile it yourself, then remember about keeping it updated (yes, a fringe little-known micro web server can have security holes too).

    bsdguy said: with minihttpd you need to wire the content into the executable (iirc)

    No. Like webfs, it just serves a directory. Maybe there's more than one server called "minihttpd" though.

  • KuJoeKuJoe Member, Host Rep

    Why not something like Node.js? A few lines of code and call it a day.

  • @raindog308 said:
    Github pages or S3 or even Dropbox.

    All can serve static pages. No real need for a VPS here, is there?

    I know you're planning to use this as an fill-in for a production server but periodically repointing DNS might be easier than maintaining a VPS.

    rocket said: Debian minimal and NGINX?

    Serving static pages is indeed what nginx does best.

    This is the best option I've seen suggested here. GitHub pages is even free, or you can pay a small monthly fee to have a private repo

    Definitely no need to have another server to care for. Bang a .html file with some images or css if you really feel fancy on to GHP and job done!

  • kh81kh81 Member

    Get Lighttpd or nginx.

  • emgemg Veteran
    edited June 2017

    Thanks for the suggestions. This is not a VPS. I would prefer to avoid redirecting DNS.

    Perhaps I left out important details that may help narrow the choices: The host computer is behind a NAT. The virtual machine servers that run on it have their own private IP addresses. If I take one down for a full backup, I want a "placeholder" virtual machine to serve a static "Routine Maintenance, Please Standby" webpage, using the same private IP address of the server it temporarily replaces.

    I am looking for best advice on how to setup that minimal footprint, lightweight, "placeholder" web server. It needs to boot in a virtual machine environment (e.g., VirtualBox or VMware or Hyper-V...). When I am done with it, I will shut it down and replace it with the production server again.

  • Seriously, give caddyserver.com a try. You can configure it with just a couple of lines. I use it a lot for small setups.

  • bsdguybsdguy Member
    edited June 2017

    @rm_ said:

    bsdguy said: darkhttpd recommended by Francisco is even better for you

    I'd say it has a fatal flaw of not being in Debian's repositories, which means you have to obtain and compile it yourself, then remember about keeping it updated (yes, a fringe little-known micro web server can have security holes too).

    bsdguy said: with minihttpd you need to wire the content into the executable (iirc)

    No. Like webfs, it just serves a directory. Maybe there's more than one server called "minihttpd" though.

    No, no, probably you are right and I remember it wrong. It's quite some years now that I used acmes minihttps and at least then I had to hardwire the content.

    Also the "available in repo" is a good argument for users with less experience. Speaking of that, I just checked debian and FreeBSD and both have an even smaller (single C file!) server: micro_httpd (also from acme). I guess that might be the best solution then.

    • extremely small (ca 10 KB), single C file
    • available in debian repo

    @KuJoe said:
    Why not something like Node.js? A few lines of code and call it a day.

    Absolute overkill plus: he wants to serve a static "in maintenance" page only.

  • KuJoeKuJoe Member, Host Rep

    @bsdguy said:

    @rm_ said:

    bsdguy said: darkhttpd recommended by Francisco is even better for you

    I'd say it has a fatal flaw of not being in Debian's repositories, which means you have to obtain and compile it yourself, then remember about keeping it updated (yes, a fringe little-known micro web server can have security holes too).

    bsdguy said: with minihttpd you need to wire the content into the executable (iirc)

    No. Like webfs, it just serves a directory. Maybe there's more than one server called "minihttpd" though.

    No, no, probably you are right and I remember it wrong. It's quite some years now that I used acmes minihttps and at least then I had to hardwire the content.

    Also the "available in repo" is a good argument for users with less experience. Speaking of that, I just checked debian and FreeBSD and both have an even smaller (single C file!) server: micro_httpd (also from acme). I guess that might be the best solution then.

    • extremely small (ca 10 KB), single C file
    • available in debian repo

    @KuJoe said:
    Why not something like Node.js? A few lines of code and call it a day.

    Absolute overkill plus: he wants to serve a static "in maintenance" page only.

    Everything is overkill for a single small page, at least Node.js is only 12 lines of code though. :)

  • Use whatever webserver you're familiar configuring. jeez.
    else, install and modify nginx 's' default site' index.htm

    It all depends on if you want to waste more than 5mins learning a new webserver conf format.

  • debian + nginx

  • @KuJoe said:
    [ ... ] at least Node.js is only 12 lines of code though. :)

    12 lines of JS maybe, and what, 10,000 lines of JS dependencies? 100,000 lines of C++ for V8?

  • KuJoeKuJoe Member, Host Rep

    @scaveney said:

    @KuJoe said:
    [ ... ] at least Node.js is only 12 lines of code though. :)

    12 lines of JS maybe, and what, 10,000 lines of JS dependencies? 100,000 lines of C++ for V8?

    But he would only need to worry about those 12 lines of JS. :D

  • @Saragoldfarb said:
    Debian + Caddy.

    I was also going to say, Caddy. I was doing a semester project and I was really interested in developing the module in Caddy, but end up doing in Nginx.

    However, Caddy seems really great, in terms that they are auto SSL, would love to try some day.

    You have had any experience with Caddy, if so, how was it? In terms of performance.

  • eva2000eva2000 Veteran

    cyberpersons said: However, Caddy seems really great, in terms that they are auto SSL, would love to try some day.

    You have had any experience with Caddy, if so, how was it? In terms of performance.

    caddy can use up to 3x times more cpu and 2.5x times more memory than nginx with 1/3rd of the performance of nginx https://community.centminmod.com/threads/caddy-http-2-server-benchmarks.5170/

    if you want lightweight server just use nginx and be done with it

Sign In or Register to comment.