📄 config.cpp
字号:
CheckPath RefuseFileByMask AllowFileMask=\"EFD\" RefuseStatus=404\n\
CheckPath RefuseFileByMask AllowFileMask=\"F\" RefuseStatus=403\n\
CheckPath ReturnCode ReturnCode=COMPLETED\n\
CheckAccess ReturnCode ReturnCode=COMPLETED\n\
CheckType ReturnCode ReturnCode=COMPLETED\n\
Handle FastCGI \\\n\
IOObject=\"FastCGIIOObject\" \\\n\
Variable=\"AUTH_TYPE=$x\" \\\n\
Variable=\"CONTENT_LENGTH=$Y\" \\\n\
Variable=\"CONTENT_TYPE=$C\" \\\n\
Variable=\"HTTPS=$g\" \\\n\
Variable=\"&if($K,HTTPS_KEYSIZE=$K,)\" \\\n\
Variable=\"&if($K,HTTPS_SECRETKEYSIZE=$G,)\" \\\n\
Variable=\"PATH_INFO=$I\" \\\n\
Variable=\"PATH_TRANSLATED=$Z\" \\\n\
Variable=\"QUERY_STRING=$q\" \\\n\
Variable=\"REMOTE_ADDR=$A\" \\\n\
Variable=\"REMOTE_HOST=$h\" \\\n\
Variable=\"REMOTE_IDENT=$i\" \\\n\
Variable=\"REMOTE_USER=$u\" \\\n\
Variable=\"REQUEST_METHOD=$m\" \\\n\
Variable=\"SCRIPT_NAME=$z\" \\\n\
Variable=\"SERVER_NAME=$v\" \\\n\
Variable=\"SERVER_PORT=$p\" \\\n\
Variable=\"SERVER_PROTOCOL=$H\" \\\n\
Variable=\"SERVER_SOFTWARE=$S\"\n\
</Object>\n\
"
os << SECTION_P17;
#define SECTION_P18 "\n\
<Object>\n\
Name ISAPI\n\
Class FlexibleHandlerClass\n\
Condition \"&cmp(&dblookup(response,string,ObjectMap),ISAPI)\"\n\
CheckPath RefuseFileByMask AllowFileMask=\"EFD\" RefuseStatus=404\n\
CheckPath RefuseFileByMask AllowFileMask=\"F\" RefuseStatus=403\n\
CheckPath ReturnCode ReturnCode=COMPLETED\n\
CheckAccess AccessByFile RequirePermissions=\"X\"\n\
CheckType ReturnCode ReturnCode=COMPLETED\n\
Handle ISAPIExtensions\n\
</Object>\n\
\n\
<Object>\n\
Name ISAPIExtensions\n\
Class ISAPI20Class\n\
# These are the server variables that are sent to the\n\
# extension\n\
Variable \"ALL_HTTP=%a\"\n\
Variable \"CONTENT_LENGTH=%l\"\n\
Variable \"AUTH_TYPE=$x\"\n\
Variable \"CONTENT_TYPE=$C\"\n\
Variable \"HTTPS=$g\"\n\
Variable \"GATEWAY_INTERFACE=CGI/1.1\"\n\
Variable \"PATH_INFO=$I\"\n\
Variable \"PATH_TRANSLATED=$Z\"\n\
Variable \"QUERY_STRING=$q\"\n\
Variable \"REMOTE_ADDR=$A\"\n\
Variable \"REMOTE_HOST=$h\"\n\
Variable \"REMOTE_IDENT=$i\"\n\
Variable \"REMOTE_USER=$u\"\n\
Variable \"REQUEST_METHOD=$m\"\n\
Variable \"SCRIPT_NAME=$z\"\n\
Variable \"SERVER_NAME=$v\"\n\
Variable \"SERVER_PORT=$p\"\n\
Variable \"SERVER_PROTOCOL=$H\"\n\
Variable \"SERVER_SOFTWARE=$S\"\n\
ExtraHeaders Yes\n\
ExtraHeadersPrefix \"HTTP_\"\n\
ExtraHeadersIgnore \"Content-Type Content-Length\"\n\
</Object>\n\
\n"
os << SECTION_P18;
#define SECTION_P40 "\n\
# ---\n\
#\n\
# Customizable Directory Listing\n\
#\n\
# ---\n\
<Object>\n\
Name CustomIndex\n\
Class DirectoryIndexClass\n\
HeaderPattern \"<HTML><TITLE>Index of %p (%SB in %N files)</TITLE>\\\n\
<BODY BACKGROUND=\"/icons/\\\n\
&if(&cmpi($o,MainVirtualHostInformation),Pi3Tile.gif,H2Tile.gif)\"/*background depends on vhost*/\\\n\
BGCOLOR=\"#FFFFFF\">\\\n\
<H2>Index of %p (%SB in %N files)</H2>\\n\"\n\
ListTop \"<CENTER><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=100'%'>\\\n\
<TR>\\\n\
<TH NOWARP ALIGN=LEFT><BR><HR SIZE=1 NOSHADE>\\\n\
<TH NOWRAP ALIGN=LEFT><A HREF=\"%p?SortType=A\">Type</A><BR><HR SIZE=1 NOSHADE>\\\n\
<TH NOWRAP ALIGN=LEFT><A HREF=\"%p?SortName=A\">Name</A><BR><HR SIZE=1 NOSHADE>\\\n\
<TH NOWRAP ALIGN=LEFT><A HREF=\"%p?SortSize=A\">Size</A><BR><HR SIZE=1 NOSHADE>\\\n\
<TH NOWRAP ALIGN=LEFT><A HREF=\"%p?SortDate=A\">Last Modified</A><BR><HR SIZE=1 NOSHADE>\\\n\
<TH NOWRAP ALIGN=LEFT><A HREF=\"%p?SortDscr=A\">Description</A><BR><HR SIZE=1 NOSHADE>\\n\"\n\
FilePattern \"<TR>\\\n\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%m</TD><TD NOWRAP ALIGN=LEFT VALIGN=TOP>\\\n\
<A HREF=\"%r\"><IMG SRC=\"%i\" BORDER=NONE ALIGN=MIDDLE ALT=\"\"></A>\\\n\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP><A HREF=\"%r\">&abbrev(%n,20,...)</A>\\\n\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%s<TD NOWRAP ALIGN=LEFT VALIGN=TOP>%l\\\n\
<TD NOWRAP ALIGN=LEFT VALIGN=TOP>&if(%d,%d,<I>%c</I>)\\n\"\n\
ListBottom \"</TABLE></CENTER>\\n\"\n\
"
#define SECTION_P41 "\
MIMEIcon \"text/html /icons/layout.gif\"\n\
MIMEIcon \"text/x-code /icons/c.gif\"\n\
MIMEIcon \"text/x-perl /icons/p.gif\"\n\
MIMEIcon \"text/\* /icons/text.gif\"\n\
MIMEIcon \"internal/x-directory /icons/folder.gif\"\n\
MIMEIcon \"audio/\* /icons/sound2.gif\"\n\
MIMEIcon \"image/\* /icons/image2.gif\"\n\
MIMEIcon \"application/x-uuencoded /icons/uuencoded.gif\"\n\
MIMEIcon \"application/x-tar /icons/compressed.gif\"\n\
MIMEIcon \"application/x-gzip /icons/compressed.gif\"\n\
MIMEIcon \"application/x-sh /icons/script.gif\"\n\
MIMEIcon \"application/\* /icons/binary.gif\"\n\
MIMEIcon \"x-world/x-vrml /icons/burst.gif\"\n\
MIMEIcon \"\*/\* /icons/unknown.gif\"\n\
SwapFileName \".. Parent Directory\"\n\
FooterPattern \"<HR SIZE=1 NOSHADE>\\\n\
Contact the hostmaster <A HREF=\"mailto:$a\"<I>$a</I></A>.\\\n\
</BODY></HTML>\"\n\
HeaderFile \"HEADER\"\n\
FooterFile \"README\"\n\
DescriptionFile \".desc\"\n\
LastModifiedFormat \"%d-%b-%y %H:%M\"\n\
Include \"\*\"\n\
Exclude \".\"\n\
Exclude \"~\*\"\n\
Exclude \".desc\"\n\
Exclude \"README\"\n\
Exclude \"HEADER\"\n\
NewPattern \"<IMG SRC=\"/icons/new.gif\">\"\n\
NewTreshold 10\n\
Options \" Name | AbbrevSize | RelPath | Icon | MIMEType | SortType | TagNew\"\n\
# SortDesc | SortCase | SortType | SortName | SortSize | SortDate | SortDscr\n\
</Object>\
\n"
os << SECTION_P40;
os << SECTION_P41;
#define SECTION_P45 "\n\
# ---\n\
#\n\
# CGIFileIOObject\n\
# \n\
# IOObject used for communication between web browser and\n\
# server.\n\
#\n\
# ---\n\
<Object>\n\
Name CGIFileIOObject\n\
Class PipeIOClass\n\
ReadTimeout -1\n\
WriteTimeout 10\n\
NoYield \"Read\"\n\
</Object>\n\
\n"
os << SECTION_P45;
#define SECTION_P20 "\n\
# ---\n\
#\n\
# StandardCGI\n\
#\n\
# Configuration for Standard CGI\n\
#\n\
# ---\n\
<Object>\n\
Name StandardCGI\n\
Class CGIClass\n\
\n\
# Specify the IO object use to communicate with the CGI program\n\
FileIOObject CGIFileIOObject\n\
\n\
# Snoop IO objects can be instantiated in the IO chain with a line\n\
# like this. They log all IO trafic. This is useful for debugging.\n\
# FileIOObject SnoopIO IOObject=\"CGIFileIOObject\" OutFile=\"cgi.dbg\" \n\
\n\
DefaultCommandLine \"%p%q\"\n\
CommandLineByExt .bat=\"cmd.exe /c %p%q\"\n\
CommandLineByExt .cmd=\"cmd.exe /c %p%q\"\n\
CommandLineByExt .pl=\"perl %p%q\"\n\
CommandLineByExt .cgi=\"perl %p%q\"\n\
IncludeParentsEnvironment Yes\n\
EnvironmentSize 8192\n\
\n\
# These are the environment variables that are sent to the\n\
# CGI program\n\
Variable \"AUTH_TYPE=$x\"\n\
Variable \"CONTENT_LENGTH=$Y\"\n\
Variable \"CONTENT_TYPE=$C\"\n\
Variable \"HTTPS=$g\"\n\
Variable \"&if($K,HTTPS_KEYSIZE=$K,)\"\n\
Variable \"&if($K,HTTPS_SECRETKEYSIZE=$G,)\"\n\
Variable \"GATEWAY_INTERFACE=CGI/1.1\"\n\
Variable \"PATH_INFO=$I\"\n\
Variable \"PATH_TRANSLATED=$Z\"\n\
Variable \"QUERY_STRING=$q\"\n\
Variable \"REMOTE_ADDR=$A\"\n\
Variable \"REMOTE_HOST=$h\"\n\
Variable \"REMOTE_IDENT=$i\"\n\
Variable \"REMOTE_USER=$u\"\n\
Variable \"REQUEST_METHOD=$m\"\n\
Variable \"SCRIPT_NAME=$z\"\n\
Variable \"SERVER_NAME=$v\"\n\
Variable \"SERVER_PORT=$p\"\n\
Variable \"SERVER_PROTOCOL=$H\"\n\
Variable \"SERVER_SOFTWARE=$S\"\n\
ExtraHeaders Yes\n\
ExtraHeadersPrefix \"HTTP_\"\n\
ExtraHeadersIgnore \"Content-Type Content-Length\"\n\
# SendCRLF Yes\n\
#\n\
# Kill CGI programs after 1 minute if they don't respond\n\
#\n\
KillAfter 60\n\
</Object>\n\
\n"
os << SECTION_P20;
#define SECTION_P21 "\n\
# ---\n\
#\n\
# WindowsCGI\n\
#\n\
# Handle windows CGI\n\
#\n\
# ---\n\
<Object>\n\
Name WindowsCGI\n\
Class WinCGIClass\n\
FileIOObject CGIFileIOObject\n\
DefaultCommandLine \"%p \"%d\"\"\n\
ExtraHeaders Yes\n\
ExtraHeadersPrefix \"HTTP_\"\n\
ExtraHeadersIgnore \"Content-Type Content-Length\"\n\
\n\
# Generate windows CGI filenames by preappending the\n\
# process id to the unique identifier.\n\
ExternalPath \"cgi-temp/\"\n\
DataFile \"cgi-temp/$P_%u.ini\"\n\
StdinFile \"cgi-temp/$P_%u.in\"\n\
StdoutFile \"cgi-temp/$P_%u.out\"\n\
DataBlock \"\[CGI]$M\\\n\
Request Protocol=$H$M\\\n\
Request Method=$m$M\\\n\
Executable Path=$f$M\\\n\
Logical Path=$I$M\\\n\
Physical Path=$Z$M\\\n\
Query String=$q$M\\\n\
Referer=&dblookup(request,rfc822,Referer)$M\\\n\
From=$i$M\\\n\
User Agent=&dblookup(request,rfc822,User-Agent)$M\\\n\
Content Type=$C$M\\\n\
Content Length=$Y$M\\\n\
Content File=%i$M\\\n\
Server Name=$v$M\\\n\
Server Admin=$a$M\\\n\
Server Port=$p$M\\\n\
Server Software=$S$M\\\n\
CGI Version=CGI/1.1 (Win)$M\\\n\
Remote Address=$A$M\\\n\
Remote Host=$h$M\\\n\
Authentication Method=$x$M\\\n\
Authenticated Username=$u$M\\\n\
Authenticated Password=&dblookup(response,string,AuthPass)$M\\\n\
Authentication Realm=&dblookup(response,string,AuthType)$M\\\n\
$M\\\n\
[Accept]$M\\\n\
%a$M\\\n\
[System]$M\\\n\
Output File=%o$M\\\n\
Content File=%i$M\\\n\
$M\\\n\
[Extra Headers]$M\\\n\
%h$M\\\n\
[Form Literal]$M\\\n\
%l$M\\\n\
[Form External]$M\\\n\
%e$M\\\n\
[Form File]$M\\\n\
%f$M\\\n\
[Form Huge]$M\\\n\
%g$M\"\n\
</Object>\n\
\n"
os << SECTION_P21;
#define SECTION_P50 "\n\
# ---\n\
#\n\
# CGIMapper\n\
#\n\
# Instance of PathMapperClass to Map CGI URLs\n\
#\n\
# CGI Scripts set PATH_INFO. \n\
#\n\
# ---\n\
<Object>\n\
Name CGIMapper\n\
Class PathMapperClass\n\
CaseSensitive \"No\"\n\
#\n\
# Subdirectories below the mapping directory should be put in path info\n\
#\n\
PathInfo \"Yes\"\n\
#\n\
# Set the 'ObjectMap' variable in the response DB if this map is\n\
# successful\n\
#\n\
Action \"&dbreplace(response,string,ObjectMap,Scripts)\"\n\
</Object>\n\
\n\
# ---\n\
#\n\
# RedirMapper, WinCGIMapper, FCGIMapper and ISAPIMapper\n\
#\n\
# Like CGIMapper, except it leaves a different marker to cause\n\
# a different object to handle the request.\n\
#\n\
# ---\n\
<Object>\n\
Name RedirectMapper\n\
Class PathMapperClass\n\
Redirect \"Yes\"\n\
Action \"&dbreplace(response,string,ObjectMap,Redirect)\"\n\
Action \"&dbreplace(response,RFC822,Location,&dblookup(response,string,Path))\"\n\
</Object>\n\
<Object>\n\
Name WinCGIMapper\n\
Class PathMapperClass\n\
PathInfo \"Yes\"\n\
Action \"&dbreplace(response,string,ObjectMap,WinScripts)\"\n\
</Object>\n\
<Object>\n\
Name FCGIMapper\n\
Class PathMapperClass\n\
PathInfo \"Yes\"\n\
Action \"&dbreplace(response,string,ObjectMap,FastCGIScripts)\"\n\
</Object>\n\
<Object>\n\
Name ISAPIMapper\n\
Class PathMapperClass\n\
PathInfo \"Yes\"\n\
Action \"&dbreplace(response,string,ObjectMap,ISAPI)\"\n\
</Object>\n\
\n"
os << SECTION_P50;
#define SECTION_P51 "\n\
# ---\n\
#\n\
# FastCGIIOObject\n\
# \n\
# IOObject for communicating with fast CGI application servers. This\n\
# one uses the TCP/IP transport.\n\
#\n\
# ---\n\
<Object>\n\
Name FastCGIIOObject\n\
Class TCPIPIOClass\n\
Type Active\n\
\n\
# Timeouts. -1 specifies no timeout.\n\
RecvTimeout 20\n\
SendTimeout 20\n\
</Object>\n\
\n"
os << SECTION_P51;
#define SECTION_P52 "\n\
# ---\n\
#\n\
# AccessLogger\n\
#\n\
# An instance of ExpressionLoggerClass configured to generate an \n\
# logfile\n\
#\n\
# ---\n\
<Object>\n\
Name AccessLogger\n\
Class ExpressionLoggerClass\n\
\n\
#\n\
# Append\n\
#\n\
OpenMode \"a\"\n\
#\n\
# Line to log \n\
Expression \"$A $h - [$t] \\\"$r\\\" $s $b$M\"\n\
</Object>\n\
\n\
# ---\n\
#\n\
# RefererLogger\n\
#\n\
# Log bad links only (HTTP error code 404)\n\
#\n\
# ---\n\
<Object>\n\
Name RefererLogger\n\
Class ExpressionLoggerClass\n\
\n\
#\n\
# Append\n\
#\n\
OpenMode \"a\"\n\
#\n\
# Line to log \n\
Expression \"&if(&cmp($s,404),\\\n\
[$t] $h \\\"$r\\\" &dblookup(request,rfc822,Referer)$M)\"\n\
</Object>\n\
\n"
os << SECTION_P52;
}
/*____________________________________________________________________________*\
*
Function:
Synopsis:
Description:
\*____________________________________________________________________________*/
void Internal_writeCustomizedParagraphs( PTConfig pConfig, ostream &os )
{
int iTmp;
#define L(x,y) (AD_lookupValue(pConfig, x, y))
#define SECTION_P1 "\
# ===\n\
#\n\
# AUTOMATICALLY GENERATED FILE\n\
#\n\
# This files was automatically generated by the Pi3 enhanced GUI\n\
# (EnhPi3.exe) for Windows 95 and Window NT 4.0\n\
#\n\
# Any changes you make to this file will be lost next time the \n\
# configuration GUI (server admin) is run and changes \n\
# are saved.\n\
#\n\
# ===\n\
\n\
\n\
\n\
# ===\n\
#\n\
# Top level configuration\n\
#\n\
# ** IMPORTANT **\n\
# If you do nothing else then do this:\n\
#\n\
\n\
#... ### ### Customize server settings\n\
\n\
# Skip below to the definition of 'MainVirtualHostInformation', change\n\
# the settings for Hostname (*Mandatory* redirects will not work without\n\
# this!) and Administrator (optional).\n\
#\n\
# ===\n\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -