⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.pi3

📁 mini http server,可以集成嵌入到程序中,实现简单的web功能
💻 PI3
📖 第 1 页 / 共 3 页
字号:
	AddMIMEEntry "sit	application/x-stuffit"
	AddMIMEEntry "sv4cpio	application/x-sv4cpio"
	AddMIMEEntry "sv4crc	application/x-sv4crc"
	AddMIMEEntry "tar	application/x-tar"
	AddMIMEEntry "tcl	application/x-tcl"
	AddMIMEEntry "tex	application/x-tex"
	AddMIMEEntry "texinfo	application/x-texinfo"
	AddMIMEEntry "texi	application/x-texinfo"
	AddMIMEEntry "t	application/x-troff"
	AddMIMEEntry "troff	application/x-troff"
	AddMIMEEntry "man	application/x-troff-man"
	AddMIMEEntry "me	application/x-troff-me"
	AddMIMEEntry "ms	application/x-troff-ms"
	AddMIMEEntry "ustar	application/x-ustar"
	AddMIMEEntry "uu	application/x-uuencoded"
	AddMIMEEntry "src	application/x-wais-source"
	AddMIMEEntry "zip	application/zip"
	AddMIMEEntry "au	audio/basic"
	AddMIMEEntry "snd	audio/basic"
	AddMIMEEntry "mid	audio/midi"
	AddMIMEEntry "midi	audio/midi"
	AddMIMEEntry "kar	audio/midi"
	AddMIMEEntry "mpga	audio/mpeg"
	AddMIMEEntry "mp2	audio/mpeg"
	AddMIMEEntry "aif	audio/x-aiff"
	AddMIMEEntry "aiff	audio/x-aiff"
	AddMIMEEntry "aifc	audio/x-aiff"
	AddMIMEEntry "ram	audio/x-pn-realaudio"
	AddMIMEEntry "rpm	audio/x-pn-realaudio-plugin"
	AddMIMEEntry "ra	audio/x-realaudio"
	AddMIMEEntry "wav	audio/x-wav"
	AddMIMEEntry "pdb	chemical/x-pdb"
	AddMIMEEntry "xyz	chemical/x-pdb"
	AddMIMEEntry "gif	image/gif"
	AddMIMEEntry "ief	image/ief"
	AddMIMEEntry "jpeg	image/jpeg"
	AddMIMEEntry "jpg	image/jpeg"
	AddMIMEEntry "jpe	image/jpeg"
	AddMIMEEntry "png	image/png"
	AddMIMEEntry "tif	image/tiff"
	AddMIMEEntry "tiff	image/tiff"
	AddMIMEEntry "bmp	image/x-MS-bmp"
	AddMIMEEntry "dip	image/x-MS-bmp"
	AddMIMEEntry "ras	image/x-cmu-raster"
	AddMIMEEntry "pnm	image/x-portable-anymap"
	AddMIMEEntry "pbm	image/x-portable-bitmap"
	AddMIMEEntry "pgm	image/x-portable-graymap"
	AddMIMEEntry "ppm	image/x-portable-pixmap"
	AddMIMEEntry "rgb	image/x-rgb"
	AddMIMEEntry "xbm	image/x-xbitmap"
	AddMIMEEntry "xpm	image/x-xpixmap"
	AddMIMEEntry "xwd	image/x-xwindowdump"
	AddMIMEEntry "htm	text/html"
	AddMIMEEntry "html	text/html"
	AddMIMEEntry "txt	text/plain"
	AddMIMEEntry "pi3	text/plain"
	AddMIMEEntry "rtx	text/richtext"
	AddMIMEEntry "tsv	text/tab-separated-values"
	AddMIMEEntry "etx	text/x-setext"
	AddMIMEEntry "sgm	text/x-sgml"
	AddMIMEEntry "sgml	text/x-sgml"
	AddMIMEEntry "c	text/x-code"
	AddMIMEEntry "cpp	text/x-code"
	AddMIMEEntry "cxx	text/x-code"
	AddMIMEEntry "cc	text/x-code"
	AddMIMEEntry "pm	text/x-perl"
	AddMIMEEntry "pl	text/x-perl"
	AddMIMEEntry "mpg	video/mpeg"
	AddMIMEEntry "mpeg	video/mpeg"
	AddMIMEEntry "mpe	video/mpeg"
	AddMIMEEntry "mov	video/quicktime"
	AddMIMEEntry "qt	video/quicktime"
	AddMIMEEntry "avi	video/x-msvideo"
	AddMIMEEntry "movie	video/x-sgi-movie"
	AddMIMEEntry "ice	x-conference/x-cooltalk"
	AddMIMEEntry "vrml	x-world/x-vrml"
	AddMIMEEntry "wrl	x-world/x-vrml"
	AddMIMEEntry "shtml	internal/x-server-parsed-html"
	AddMIMEEntry "html-ssi	internal/x-server-parsed-html"
	AddMIMEEntry "ssi	internal/x-server-parsed-html"
	AddMIMEEntry "fcgi	internal/x-fastcgi"
	AddMIMEEntry "map	internal/x-imagemap"
	AddMIMEEntry "imap	internal/x-imagemap"
	AddMIMEEntry "php	internal/x-server-parsed-php"
	AddMIMEEntry "php3	internal/x-server-parsed-php"
	AddMIMEEntry "php4	internal/x-server-parsed-php"
	AddMIMEEntry "psp	internal/x-server-parsed-psp"
	AddMIMEEntry "ppsp	internal/x-server-parsed-psp"
	AddMIMEEntry "jsp	internal/x-server-parsed-jsp"
	AddMIMEEntry "asp	internal/x-server-parsed-asp"
	AddMIMEEntry "cfm	internal/x-server-parsed-cfm"
	AddMIMEEntry "xml	internal/x-server-parsed-xml"
	KeepOpen "On"
	DefaultMIMEType "application/octet-stream"

	ServerRoot ./../
	ServerStamp Pi3Web/2.0.3
	DefaultHost MainVirtualHostInformation
# MIMEFile is not used here because extensions to media mappings are done 
# explicitly with AddMIMEEntry 
#	MIMEFile "Fragment/Mime.typ"
	ErrorLogFile "Logs/error.txt"
	Handlers Start Options Scripts WinScripts FastCGIScripts ISAPI Default

	# Specifying a file for DebugLogFile effectively turns on debugging
#	DebugLogFile "Logs/debug.txt"

	#
	# The following to directives specify expressions to be logged
	# before and after each handler execution respectively.
	# The expression as given logs process/thread and handler context
	# information indented to the nested handler level.
	#
	# Timing information is also given for performance tuning.
	#
	# This logging information is EXTREMELY verbose. Don't even
	# think about using it in a production server
	#
	DebugBeforeHandler "[$P:$k] &align(,$X)&align(,$X) |--> $T \
-------- &align($N,12) &align($R,12) $n \"$r\" $s"
	DebugAfterHandler "[$P:$k] &align(,$X)&align(,$X) |<-- $T \
&align($D,8) &align($N,12) &align($R,12) $n \"$r\" $s"
</Object>

# ---
#
# Options
#
#	Handle requests with HTTP/1.1 methods OPTIONS | TRACE
#
# ---
<Object>
	Name Options
	Class FlexibleHandlerClass
	Condition "&or(&cmpi($m,OPTIONS),&cmpi($m,TRACE))"
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckAccess ReturnCode ReturnCode=COMPLETED
	CheckType ReturnCode ReturnCode=COMPLETED

	# Extended SendFile object will handle HTTP/1.1 requests
	Handle SendFile Methods="OPTIONS | TRACE"
</Object>

# ---
#
# Authenticate
#
#	Handle authentication according to realm
#
# ---
<Object>
	Name Authenticate
	Class FlexibleHandlerClass
	# Pass authentication if there is no realm 
	CheckAuth Condition="&not(&dblookup(response,string,AuthenticationRealm))" \
		ReturnCode ReturnCode=COMPLETED
	CheckAuth BasicAuth_Administration
</Object>

# ---
#
# Authentication realm objects
#
# ---
<Object>
	Name BasicAuth_Administration
	Class BasicAuthClass
	Realm "Administration"
	Base64 "aG9sZ2VyOnRyYXJh"
</Object>

#+++---AD Generated section end---+++
#+++---AD Saved Section, modifications will be retained---+++

# ---
# 
# Scripts, WinScripts, FastCGIScripts
#
#	Handler sequences for resources which have mapped to these
# 	respective types
#
# ---
<Object>
	Name Scripts
	Class FlexibleHandlerClass
	Condition "&cmp(&dblookup(response,string,ObjectMap),Scripts)"
	CheckPath RefuseFileByMask AllowFileMask="EFD" RefuseStatus=404
	CheckPath RefuseFileByMask AllowFileMask="F" RefuseStatus=403
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckAccess AccessByFile RequirePermissions="X"
	CheckType ReturnCode ReturnCode=COMPLETED
	Handle StandardCGI
</Object>

<Object>
	Name WinScripts
	Class FlexibleHandlerClass
	Condition "&cmp(&dblookup(response,string,ObjectMap),WinScripts)"
	CheckPath RefuseFileByMask AllowFileMask="EFD" RefuseStatus=404
	CheckPath RefuseFileByMask AllowFileMask="F" RefuseStatus=403
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckAccess AccessByFile RequirePermissions="X"
	CheckType ReturnCode ReturnCode=COMPLETED
	Handle WindowsCGI
</Object>

<Object>
	Name FastCGIScripts
	Class FlexibleHandlerClass
	Condition "&cmp(&dblookup(response,string,ObjectMap),FastCGIScripts)"
	CheckPath RefuseFileByMask AllowFileMask="EFD" RefuseStatus=404
	CheckPath RefuseFileByMask AllowFileMask="F" RefuseStatus=403
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckAccess ReturnCode ReturnCode="COMPLETED"
	CheckType ReturnCode ReturnCode="COMPLETED"
	Handle FastCGI \
		IOObject="FastCGIIOObject" \
		Variable="AUTH_TYPE=$x" \
		Variable="CONTENT_LENGTH=$Y" \
		Variable="CONTENT_TYPE=$C" \
		Variable="HTTPS=$g" \
		Variable="&if($K,HTTPS_KEYSIZE=$K,)" \
		Variable="&if($K,HTTPS_SECRETKEYSIZE=$G,)" \
		Variable="PATH_INFO=$I" \
		Variable="PATH_TRANSLATED=$Z" \
		Variable="QUERY_STRING=$q" \
		Variable="REMOTE_ADDR=$A" \
		Variable="REMOTE_HOST=$h" \
		Variable="REMOTE_IDENT=$i" \
		Variable="REMOTE_USER=$u" \
		Variable="REQUEST_METHOD=$m" \
		Variable="SCRIPT_NAME=$z" \
		Variable="SERVER_NAME=$v" \
		Variable="SERVER_PORT=$p" \
		Variable="SERVER_PROTOCOL=$H" \
		Variable="SERVER_SOFTWARE=$S"
</Object>

<Object>
	Name ISAPI
	Class FlexibleHandlerClass
	Condition "&cmp(&dblookup(response,string,ObjectMap),ISAPI)"
	CheckPath RefuseFileByMask AllowFileMask="EFD" RefuseStatus=404
	CheckPath RefuseFileByMask AllowFileMask="F" RefuseStatus=403
	CheckPath ReturnCode ReturnCode=COMPLETED
	CheckAccess AccessByFile RequirePermissions="X"
	CheckType ReturnCode ReturnCode=COMPLETED
	Handle ISAPIExtensions
</Object>

<Object>
	Name ISAPIExtensions
	Class ISAPI20Class
	# These are the server variables that are sent to the
	# extension
	Variable "ALL_HTTP=%a"
	Variable "CONTENT_LENGTH=%l"
	Variable "AUTH_TYPE=$x"
	Variable "CONTENT_TYPE=$C"
	Variable "HTTPS=$g"
	Variable "GATEWAY_INTERFACE=CGI/1.1"
	Variable "PATH_INFO=$I"
	Variable "PATH_TRANSLATED=$Z"
	Variable "QUERY_STRING=$q"
	Variable "REMOTE_ADDR=$A"
	Variable "REMOTE_HOST=$h"
	Variable "REMOTE_IDENT=$i"
	Variable "REMOTE_USER=$u"
	Variable "REQUEST_METHOD=$m"
	Variable "SCRIPT_NAME=$z"
	Variable "SERVER_NAME=$v"
	Variable "SERVER_PORT=$p"
	Variable "SERVER_PROTOCOL=$H"
	Variable "SERVER_SOFTWARE=$S"
	ExtraHeaders Yes
	ExtraHeadersPrefix "HTTP_"
	ExtraHeadersIgnore "Content-Type Content-Length"
</Object>

# ---
#
# Directory listing with HTML tables
#
# ---
<Object>
	Name TableHTML
	Class DirectoryIndexClass
	HeaderPattern "<HTML><META HTTP-EQUIV="expires" CONTENT="0"><TITLE>Index of %p</TITLE>\
<BODY BACKGROUND="/icons/\
&if(&cmpi($o,MainVirtualHostInformation),Pi3Tile.gif,H2Tile.gif)"/*background depends on vhost*/\
BGCOLOR="#FFFFFF">\
<H2>Index of %p</H2>\n"
	ListTop "<CENTER><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=100'%'>\
<TR>\
<TH NOWRAP ALIGN=LEFT></TH>\
<TH NOWARP ALIGN=LEFT><A HREF="%p?SortType=A">Type</A><BR>\&nbsp;\
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortName=A">Name</A><BR>\&nbsp;\
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortSize=A">Size</A><BR>\&nbsp;\
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortDate=A">Last Modified</A><BR>\&nbsp;\
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortDscr=A">Description</A><BR>\&nbsp;\n"
	FilePattern "<TR>\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%m</TD><TD NOWRAP ALIGN=LEFT VALIGN=TOP>\
<A HREF="%r"><IMG SRC="%i" BORDER=NONE ALIGN=MIDDLE ALT=""></A>\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP><A HREF="%r">&abbrev(%n,20,...)</A>\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%s<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%l\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>&if(%d,%d,<I>%c</I>)\n"
	ListBottom "</TABLE></CENTER>\n"
	LastModifiedFormat "%d-%b-%y %H:%M"
	Include "*"

	MIMEIcon "text/html /icons/layout.gif"
	MIMEIcon "text/x-code /icons/c.gif"
	MIMEIcon "text/x-perl /icons/p.gif"
	MIMEIcon "text/* /icons/text.gif"
	MIMEIcon "internal/x-directory /icons/folder.gif"
	MIMEIcon "audio/* /icons/sound2.gif"
	MIMEIcon "image/* /icons/image2.gif"
	MIMEIcon "application/x-uuencoded /icons/uuencoded.gif"
	MIMEIcon "application/x-tar /icons/compressed.gif"
	MIMEIcon "application/x-gzip /icons/compressed.gif"
	MIMEIcon "application/x-sh /icons/script.gif"
	MIMEIcon "application/* /icons/binary.gif"
	MIMEIcon "x-world/x-vrml /icons/burst.gif"
	MIMEIcon "*/* /icons/unknown.gif"
	DescriptionFile ".desc"
	SwapFileName ".. .."
	FooterPattern "<HR SIZE=1 NOSHADE>\
Contact the hostmaster <A HREF="mailto:$a"<I>$a</I></A>.\
</BODY></HTML>"
	HeaderFile "HEADER"
	FooterFile "README"
	Exclude "."
	Exclude "~*"
	Exclude ".desc"
	Exclude "README"
	Exclude "HEADER"
	NewPattern "<IMG SRC="/icons/new.gif">"
	NewTreshold 10
	Options " Name | AbbrevSize | RelPath | Icon | MIMEType | SortType | TagNew"
# SortDesc | SortCase | SortType | SortName | SortSize | SortDate | SortDscr
</Object>

# ---
#
# CGIFileIOObject
# 	
#	IOObject used for communication between web browser and
#	server.
#
# ---
<Object>
	Name CGIFileIOObject
	Class PipeIOClass
	ReadTimeout -1
	WriteTimeout 10
	NoYield "Read"
</Object>


# ---
#
# StandardCGI
#
# Configuration for Standard CGI
#
# ---
<Object>
	Name StandardCGI
	Class CGIClass
	
	# Specify the IO object use to communicate with the CGI program
	FileIOObject CGIFileIOObject

	# Snoop IO objects can be instantiated in the IO chain with a line
	# like this. They log all IO traffic. This is useful for debugging.
#	FileIOObject SnoopIO IOObject="CGIFileIOObject" OutFile="cgi.dbg" 

	DefaultCommandLine "%p%q"
	CommandLineByExt .bat="cmd.exe /c %p%q"
	CommandLineByExt .cmd="cmd.exe /c %p%q"
	CommandLineByExt .pl="perl %p%q"
	CommandLineByExt .cgi="perl %p%q"
	IncludeParentsEnvironment Yes
	EnvironmentSize 8192
	
	# These are the environment variables that are sent to the
	# CGI program
	Variable "AUTH_TYPE=$x"
	Variable "CONTENT_LENGTH=$Y"
	Variable "CONTENT_TYPE=$C"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -