当前位置: 首页 > 工具软件 > thttpd > 使用案例 >

thttpd html文件,thttpd man page

琴镜
2023-12-01

-C

Specifies a config-file to read.

All options can be set either by command-line flags or in the

config file.

See below for details.

-p

Specifies an alternate port number to listen on.

The default is 80.

The config-file option name for this flag is "port",

and the config.h option is

DEFAULT_PORT.

-d

Specifies a directory to chdir() to at startup.

This is merely a convenience - you could just as easily do a

cd in the shell script that invokes the program.

The config-file option name for this flag is "dir",

and the config.h options are

,

.

-r

Do a chroot() at initialization time, restricting file

access to the program's current directory.

If -r is the compiled-in default, then -nor disables it.

See below for details.

The config-file option names for this flag are "chroot" and "nochroot",

and the config.h option is

ALWAYS_CHROOT.

-dd

Specifies a directory to chdir() to after chrooting.

If you're not chrooting, you might as well do a single chdir() with

the -d flag.

If you are chrooting, this lets you put the web files in a subdirectory

of the chroot tree, instead of in the top level mixed in with the

chroot files.

The config-file option name for this flag is "data_dir".

-nos

Don't do explicit symbolic link checking.

Normally, thttpd explicitly expands any symbolic links in

filenames, to check that the resulting path stays within

the original document tree.

If you want to turn off this check and save some CPU time, you can use

the -nos flag, however this is not recommended.

Note, though, that if you are using the chroot option, the symlink

checking is unnecessary and is turned off, so the safe way to save

those CPU cycles is to use chroot.

The config-file option names for this flag are

"symlinkcheck" and "nosymlinkcheck".

-v

Do el-cheapo virtual hosting.

If -v is the compiled-in default, then -nov disables it.

See below for details.

The config-file option names for this flag are "vhost" and "novhost",

and the config.h option is

ALWAYS_VHOST.

-g

Use a global passwd file.

This means that every file in the entire document tree is protected by

the single .htpasswd file at the top of the tree.

Otherwise the semantics of the .htpasswd file are the same.

If this option is set but there is no .htpasswd file in

the top-level directory, then thttpd proceeds as if the option was

not set - first looking for a local .htpasswd file, and if that doesn't

exist either then serving the file without any password.

If -g is the compiled-in default, then -nog disables it.

The config-file option names for this flag are "globalpasswd" and

"noglobalpasswd",

and the config.h option is

ALWAYS_GLOBAL_PASSWD.

-u

Specifies what user to switch to after initialization when started

as root.

The default is "nobody".

The config-file option name for this flag is "user",

and the config.h option is

DEFAULT_USER.

-c

Specifies a wildcard pattern for CGI programs, for instance "**.cgi"

or "/cgi-bin/*".

See below for details.

The config-file option name for this flag is "cgipat",

and the config.h option is

CGI_PATTERN.

-t

Specifies a file of throttle settings.

See below for details.

The config-file option name for this flag is "throttles".

-h

Specifies a hostname to bind to, for multihoming.

The default is to bind to all hostnames supported on the local machine.

See below for details.

The config-file option name for this flag is "host",

and the config.h option is

SERVER_NAME.

-l

Specifies a file for logging.

If no -l argument is specified, thttpd logs via syslog().

If "-l /dev/null" is specified, thttpd doesn't log at all.

The config-file option name for this flag is "logfile".

-i

Specifies a file to write the process-id to.

If no file is specified, no process-id is written.

You can use this file to send signals to thttpd.

See below for details.

The config-file option name for this flag is "pidfile".

-T

Specifies the character set to use with text MIME types.

The default is UTF-8.

The config-file option name for this flag is "charset",

and the config.h option is

DEFAULT_CHARSET.

-P

Specifies a P3P server privacy header to be returned with all responses.

See http://www.w3.org/P3P/

for details.

Thttpd doesn't do anything at all with the string except put it in the

P3P: response header.

The config-file option name for this flag is "p3p".

-M

Specifies the number of seconds to be used in a "Cache-Control: max-age"

header to be returned with all responses.

An equivalent "Expires" header is also generated.

The default is no Cache-Control or Expires headers,

which is just fine for most sites.

The config-file option name for this flag is "max_age".

-V

Shows the current version info.

-D

This was originally just a debugging flag, however it's worth

mentioning because one of the things it does is prevent thttpd

from making itself a background daemon.

Instead it runs in the foreground like a regular program.

This is necessary when you want to run thttpd wrapped in a little shell

script that restarts it if it exits.

 类似资料: