Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
server:web [2010/02/21 21:39] digitalmanserver:web [2015/11/02 11:13] – [webctrl.ini per-directory configuration file] Add FastCGISocket documentation. deuce
Line 1: Line 1:
 ====== Web Server ====== ====== Web Server ======
 +
 +The Synchronet Web Server serves static (e.g. files) and dynamic content to HTTP clients (e.g. web browsers).
  
 ===== Introduction ===== ===== Introduction =====
Line 15: Line 17:
 ==== Startup INI [Web] Section Keys ==== ==== Startup INI [Web] Section Keys ====
  
-The ''[Web]'' section of your [[:config/Startup INI]] file contains the following settings (keys):+The ''[Web]'' section of your [[config:sbbs.ini]] file contains the following settings (keys):
  
 === RootDirectory === === RootDirectory ===
Line 47: Line 49:
 === Authorization === === Authorization ===
  
-Default value: ''Basic,Default''+Default value: ''Basic,Digest''
  
 A comma-separated list of authentication mechanisms in order of preference. A comma-separated list of authentication mechanisms in order of preference.
Line 111: Line 113:
 Default value: ''NO_HOST_LOOKUP'' Default value: ''NO_HOST_LOOKUP''
  
-The ''Options'' key is set to a ''|'' separated list of options to enable.  In addition to the [[:config/Startup INI|standard options]], the web server also supports the following:+The ''Options'' key is set to a ''|'' separated list of options to enable.  In addition to the [[config:sbbs.ini|standard options]], the web server also supports the following:
  
 ''DEBUG_RX'' ''DEBUG_RX''
Line 174: Line 176:
 ==== Other configuration files ==== ==== Other configuration files ====
  
-In addition to the ''[Web]'' keys in the [[Startup INI]] file, the web server+In addition to the ''[Web]'' keys in the [[config:sbbs.ini]] file, the web server
 also uses some other configuration files: also uses some other configuration files:
  
Line 214: Line 216:
 Each directory under the [[#RootDirectory]] may have a ''webctrl.ini'' file which overrides certain settings for Each directory under the [[#RootDirectory]] may have a ''webctrl.ini'' file which overrides certain settings for
 the directory it's in and all child directories.  Configuration keys may be set the directory it's in and all child directories.  Configuration keys may be set
-either globally, or in a per-filename group.  Using the * and ? wildcards as +either globally, in a per-filename group, or, in version 3.17 or greater, a per-directory-name group. 
-the group name such as ''[*.html]'' The following keys may be used in these files:+Using the * and ? wildcards as the group name such as ''[*.html]'' or ''[dirname/]'' The following keys may be used in these files:
  
 === AccessRequirements === === AccessRequirements ===
Line 248: Line 250:
  
 For example, to require a login, but allow **any** user to access files in a For example, to require a login, but allow **any** user to access files in a
-directory, but only a sysop to access ''*.log'' files, the following could be used:+directory, but only a sysop to access ''*.log'' files and .git directories, the following could be used:
 <file webctrl.ini> <file webctrl.ini>
 AccessRequirements=level 0 AccessRequirements=level 0
 [*.log] [*.log]
 AccessRequirements=level 90 AccessRequirements=level 90
 +[*.git]
 +AccessRequirements=level 90
 +</file>
 +
 +=== FastCGISocket ===
 +Specifies the socket and port of a FastCGI listener in the <Address>:<Port> format (ie: 127.0.0.1:9000).  Should be used with wildcard sections like this:
 +<file webctrl.ini>
 +[*.php]
 +FastCGISocket=127.0.0.1:9000
 </file> </file>
  
 +Added on November 1st, 2015 to CVS (in 3.17a).
  
 +See [[howto:php]] for details on using with PHP.
 ===== JavaScript Objects ===== ===== JavaScript Objects =====
 In addition to the standard JavaScript objects, the web server provides the In addition to the standard JavaScript objects, the web server provides the
Line 470: Line 483:
  
 <code javascript> <code javascript>
-    var DefaultTheme="Default";+var DefaultTheme="Default";
 </code>  </code> 
 to: to:
 <code javascript> <code javascript>
-    var DefaultTheme="CoolTheme";+var DefaultTheme="CoolTheme";
 </code> </code>
  
Line 537: Line 550:
 ''%%name%%'' is replaced with the HTML encoded value of template.name ''%%name%%'' is replaced with the HTML encoded value of template.name
  
-i.e.; Spaces are replaced with: this&nbsp;is&nbsp;html+i.e.; Spaces are replaced with: ''this&nbsp;is&nbsp;html''
  
 ''^^name^^'' is replaced with the URI encoded value of template.name ''^^name^^'' is replaced with the URI encoded value of template.name
  
-i.e.; Spaces are replaced with:  this%20is%20URI+i.e.; Spaces are replaced with:  ''this%20is%20URI''
                      
-''@@name@@'' is replaced with the value if template.name+''@@name@@'' is replaced with the value if ''template.name''
  
 No changes or encoding is performed. No changes or encoding is performed.
  
-''@@name:sname@@'' is replaced with the value of template.name.sname+''@@name:sname@@'' is replaced with the value of ''template.name.sname''
 (^^ and %% are also supported) (^^ and %% are also supported)
  
-''@@JS:js_expression@@'' is replaced with the return value of js_expression   +''@@JS:js_expression@@'' is replaced with the return value of ''js_expression''
 (^^ and %% are also supported) (^^ and %% are also supported)
  
Line 559: Line 572:
 </code> </code>
  
-Iterates over the array/object template.name and replaces name:sname with  +Iterates over the array/object ''template.name'' and replaces ''name:sname'' with  
-the value of template.name.sname.+the value of ''template.name.sname''.
 (^^ and %% are also supported) (^^ and %% are also supported)
  
Line 711: Line 724:
 check for files. check for files.
  
 +{{indexmenu_n>4}}