📄 asp.pi3
字号:
# - The Value of ObjectMap in the response DB is ""
# AND
# - The Media type of the resource does not match internal/*
#
Handle Condition="&and(¬(&dblookup(response,string,ObjectMap)),\
¬(®exp('internal/*',$c)))" SendFile
Handle Condition="&cmp($c,internal/x-directory)" TableHTML
Handle Condition="&cmp($c,internal/x-server-parsed-html)" SendSSI \
Exec=Yes ExecFileFixup="\n/* exec file="" maps to Standard CGI (Scripts) */\
&dbreplace(response,string,ObjectMap,Scripts)\n&dbreplace(response,rfc822,Content-Type,internal/x-cgi)"
Handle Condition="&cmp($c,internal/x-imagemap)" ImageMap
Handle SendFile
Log AccessLogger File="Logs/access.txt"
Log ReturnCode ReturnCode=COMPLETED
Destroy DeleteTemporaryFiles
</Object>
# ---
#
# HTTPLogicObject
#
# HTTP Logic object, dispatches requests to all other handlers
#
# ---
<Object>
Name HTTPLogicObject
Class HTTPDispatcherClass
KeepOpen "On"
DefaultMIMEType "application/octet-stream"
ServerRoot ./../
ServerStamp Pi3Web/2.0.3
DefaultHost MainVirtualHostInformation
MIMEFile "Fragment/Mime.typ"
ErrorLogFile "Logs/error.txt"
Handlers Start 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>
# ---
#
# Authenticate
#
# Handle authentication according to realm
#
# ---
<Object>
Name Authenticate
Class FlexibleHandlerClass
# Pass authentication if there is no realm
CheckAuth Condition="¬(&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>
# ---
#
# ISAPI
#
# Handler sequences for resources which have mapped to these
# respective types
#
# ---
<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>\ \
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortName=A">Name</A><BR>\ \
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortSize=A">Size</A><BR>\ \
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortDate=A">Last Modified</A><BR>\ \
<TH NOWRAP ALIGN=LEFT><A HREF="%p?SortDscr=A">Description</A><BR>\ \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"
</Object>
# ---
#
# ISAPIMapper
#
# Like CGIMapper, except it leaves a different marker to cause
# a different object to handle the request.
#
# ---
<Object>
Name ISAPIMapper
Class PathMapperClass
PathInfo "Yes"
Action "&dbreplace(response,string,ObjectMap,ISAPI)"
</Object>
<Object>
Name ASPMapper
Class PathMapperClass
PathInfo "No"
Action "&dbreplace(response,string,ObjectMap,ISAPI)"
Action "&dbreplace(response,string,PathInfo,&dblookup(response,string,ScriptName))"
Action "&dbreplace(response,string,PathTranslated,&dblookup(response,string,Path))"
Action "&dbreplace(response,string,Path,..\\ISAPI\\asp.dll)"
</Object>
<Object>
Name CFMapper
Class PathMapperClass
PathInfo "No"
Action "&dbreplace(response,string,ObjectMap,ISAPI)"
Action "&dbreplace(response,string,PathInfo,&dblookup(response,string,ScriptName))"
Action "&dbreplace(response,string,PathTranslated,&dblookup(response,string,Path))"
Action "&dbreplace(response,string,Path,\\Programme\\cfusion\\bin\\iscf.dll)"
</Object>
# ---
#
# AccessLogger
#
# An instance of ExpressionLoggerClass configured to generate an
# logfile
#
# ---
<Object>
Name AccessLogger
Class ExpressionLoggerClass
#
# Append
#
OpenMode "a"
#
# Line to log
Expression "$A $h - [$t] \"$r\" $s $b$M"
</Object>
# ---
#
# RefererLogger
#
# Log bad links only (HTTP error code 404)
#
# ---
<Object>
Name RefererLogger
Class ExpressionLoggerClass
#
# Append
#
OpenMode "a"
#
# Line to log
Expression "&if(&cmp($s,404),\
[$t] $h \"$r\" &dblookup(request,rfc822,Referer)$M)"
</Object>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -