Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

micro-httpd(8) [debian man page]

micro-httpd(8)							   User Commands						    micro-httpd(8)

NAME
micro-httpd - really small HTTP server SYNOPSIS
micro-httpd DIRECTORY OPTIONS
None. DESCRIPTION
micro-httpd is a very small HTTP server all in 150 lines of code. It runs from inetd, which means its performance is poor. But for low- traffic sites, it is quite adequate. It implements all the basic features of an HTTP server, including: * Security against ".." filename snooping. * The common MIME types. * Trailing-slash redirection. * index.html * Directory listings. To install it, add a line like this to /etc/inetd.conf: micro-http stream tcp nowait nobody /usr/sbin/micro-httpd micro-httpd dir Make sure the path to the executable is correct, and change "dir" to be the directory you want to serve. You could add line like this to /etc/services: micro-http port/tcp #Micro HTTP server Change "port" to the port number you want to use: 80, 8000, whatever. Restart inetd by sending it a "HUP" signal. On some systems, inetd has a maximum spawn rate - if you try to run inetd services faster than a certain number of times per minute, it assumed there is either a bug of an attack going on and it shuts down for a few minutes. If you run into this problem - look for syslog messages about too-rapid looping - you will need to find out how to increase the limit. Unfortunately this varies from OS to OS. On FreeBSD, you add a "-R 10000" flag to inetd's initial command line. On some Linux systems, you can set the limit on a per-service basis in inetd.conf, by changing "nowait" to "nowait.10000". Note that you can use micro-httpd to serve HTTPS, if you like, by running it from stunnel. First fetch and install stunnel - FreeBSD users can just go to /usr/ports/security/stunnel and do a "make cert ; make install". Then as root run: stunnel -p /usr/local/certs/stunnel.pem -d 443 -l /usr/sbin/micro-httpd -- micro-httpd dir Make sure the paths to the certificate and executable are correct, and again don not forget to change "dir" to the directory you want to serve. ENVIRONMENT
None. FILES
None. SEE ALSO
inetd(8) micro-inetd(8) xinetd(8) AUTHORS
Copyright (C) 1999 Jef Poskanzer <jef@mail.acme.com>. All rights reserved. This manual page was updated by Jari Aalto <jari.aalto@cante.net>. Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit <http://www.gnu.org/copyleft/gpl.html>. micro-httpd 2012-04-03 micro-httpd(8)

Check Out this Related Man Page

GIT-INSTAWEB(1) 						    Git Manual							   GIT-INSTAWEB(1)

NAME
git-instaweb - Instantly browse your working repository in gitweb SYNOPSIS
git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>] git instaweb [--start] [--stop] [--restart] DESCRIPTION
A simple script to set up gitweb and a web server for browsing the local repository. OPTIONS
-l, --local Only bind the web server to the local IP (127.0.0.1). -d, --httpd The HTTP daemon command-line that will be executed. Command-line options may be specified here, and the configuration file will be added at the end of the command-line. Currently apache2, lighttpd, mongoose, plackup and webrick are supported. (Default: lighttpd) -m, --module-path The module path (only needed if httpd is Apache). (Default: /usr/lib/apache2/modules) -p, --port The port number to bind the httpd to. (Default: 1234) -b, --browser The web browser that should be used to view the gitweb page. This will be passed to the git web--browse helper script along with the URL of the gitweb instance. See git-web--browse(1) for more information about this. If the script fails, the URL will be printed to stdout. start, --start Start the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. stop, --stop Stop the httpd instance and exit. This does not generate any of the configuration files for spawning a new instance, nor does it close the browser. restart, --restart Restart the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. CONFIGURATION
You may specify configuration in your .git/config [instaweb] local = true httpd = apache2 -f port = 4321 browser = konqueror modulepath = /usr/lib/apache2/modules If the configuration variable instaweb.browser is not set, web.browser will be used instead if it is defined. See git-web--browse(1) for more information about this. SEE ALSO
gitweb(1) GIT
Part of the git(1) suite Git 1.7.10.4 11/24/2012 GIT-INSTAWEB(1)
Man Page