Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
server:web [2010/02/21 21:27] – digitalman | server: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 '' | + | The '' |
=== RootDirectory === | === RootDirectory === | ||
Line 24: | Line 26: | ||
'' | '' | ||
- | ::!:: Older versions of Synchronet had this value default to '' | + | **NOTE**: Older versions of Synchronet had this value default to '' |
=== ErrorDirectory === | === ErrorDirectory === | ||
Default value: '' | Default value: '' | ||
- | The directory relative to [# | + | The directory relative to [[# |
message files are located. | message files are located. | ||
numeric HTTP error code they will represent and may be either '' | numeric HTTP error code they will represent and may be either '' | ||
Line 47: | Line 49: | ||
=== Authorization === | === Authorization === | ||
- | Default value: '' | + | Default value: '' |
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: '' | Default value: '' | ||
- | The | separated list of options to enable. | + | The '' |
- | options, the web server also supports the following: | + | |
'' | '' | ||
Line 130: | Line 131: | ||
host names, you can have each host name return unique content | host names, you can have each host name return unique content | ||
depending on which hostname is used. ie: if | depending on which hostname is used. ie: if | ||
- | freebsd.synchro.net and nix.synchro.net both resolved to your | + | '' |
system, you could have FreeBSD-specific pages on one, and | system, you could have FreeBSD-specific pages on one, and | ||
general *nix stuff on the other. | general *nix stuff on the other. | ||
A virtual host is added by simply putting the desired content | A virtual host is added by simply putting the desired content | ||
- | into a sub-directory of RootDirectory with the desired hostname | + | into a sub-directory of [[#RootDirectory]] with the desired hostname |
- | ie: web/ | + | ie: '' |
the request host name (very old browsers, or some automated | the request host name (very old browsers, or some automated | ||
tools) they will be served out of document root. | tools) they will be served out of document root. | ||
It is therefore a good idea to put links to your various | It is therefore a good idea to put links to your various | ||
- | virtual hosts in an index.html page in RootDirectory something | + | virtual hosts in an '' |
like this: | like this: | ||
<code html> | <code html> | ||
Line 175: | Line 176: | ||
==== Other configuration files ==== | ==== Other configuration files ==== | ||
- | In addition to the '' | + | In addition to the '' |
also uses some other configuration files: | also uses some other configuration files: | ||
Line 215: | Line 216: | ||
Each directory under the [[# | Each directory under the [[# | ||
the directory it's in and all child directories. | the directory it's in and all child directories. | ||
- | either globally, | + | either globally, in a per-filename group, or, in version 3.17 or greater, a per-directory-name group. |
- | the group name such as '' | + | Using the * and ? wildcards as the group name such as '' |
=== AccessRequirements === | === AccessRequirements === | ||
Line 249: | 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 '' | + | directory, but only a sysop to access '' |
- | AccessRequirements=level 0 | + | <file webctrl.ini> |
- | [*.log] | + | AccessRequirements=level 0 |
- | AccessRequirements=level90 | + | [*.log] |
+ | AccessRequirements=level 90 | ||
+ | [*.git] | ||
+ | AccessRequirements=level 90 | ||
+ | </ | ||
+ | === FastCGISocket === | ||
+ | Specifies the socket and port of a FastCGI listener in the < | ||
+ | <file webctrl.ini> | ||
+ | [*.php] | ||
+ | FastCGISocket=127.0.0.1: | ||
+ | </ | ||
+ | Added on November 1st, 2015 to CVS (in 3.17a). | ||
+ | |||
+ | See [[howto: | ||
===== 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 384: | Line 398: | ||
=== Top Navigation === | === Top Navigation === | ||
- | ../ | + | ../ |
+ | | ||
- | The topnav.inc file contains the basic design of the " | + | The '' |
- | The links are dynamically generated by topnav_html.ssjs so both | + | The links are dynamically generated by '' |
files need to be addressed when modifying or creating themes. | files need to be addressed when modifying or creating themes. | ||
- | In the case of the default layout, topnav.inc has a left and right | + | In the case of the default layout, |
graphic and a middle section that the dynamic content goes. The | graphic and a middle section that the dynamic content goes. The | ||
background image is handled by CSS. You can change this to anything | background image is handled by CSS. You can change this to anything | ||
you like. | you like. | ||
- | The topnav_html.ssjs file may seem daunting at first, but it is | + | The '' |
pretty straight forward. | pretty straight forward. | ||
check the current page location and sets up the breadcrumbs based | check the current page location and sets up the breadcrumbs based | ||
Line 467: | Line 482: | ||
To change the Default Theme, change: | To change the Default Theme, change: | ||
- | | + | <code javascript> |
+ | var DefaultTheme=" | ||
+ | </ | ||
to: | to: | ||
- | | + | <code javascript> |
+ | var DefaultTheme=" | ||
+ | </ | ||
==== Special Codes Used in the SSJS Template System ==== | ==== Special Codes Used in the SSJS Template System ==== | ||
Line 532: | Line 550: | ||
'' | '' | ||
- | i.e.; Spaces are replaced with: this& | + | i.e.; Spaces are replaced with: '' |
'' | '' | ||
- | i.e.; Spaces are replaced with: this%20is%20URI | + | i.e.; Spaces are replaced with: |
| | ||
- | '' | + | '' |
No changes or encoding is performed. | No changes or encoding is performed. | ||
- | '' | + | '' |
(^^ and %% are also supported) | (^^ and %% are also supported) | ||
- | '' | + | '' |
(^^ and %% are also supported) | (^^ and %% are also supported) | ||
- | | + | <code javascript> |
- | @@name: | + | << |
- | <<END REPEAT name>> | + | @@name: |
+ | <<END REPEAT name>> | ||
+ | </code> | ||
- | Iterates over the array/ | + | Iterates over the array/ |
- | the value of template.name.sname. | + | the value of '' |
(^^ and %% are also supported) | (^^ and %% are also supported) | ||
Line 598: | Line 618: | ||
For example, it can check if the user is Guest or an actual user with this line: | For example, it can check if the user is Guest or an actual user with this line: | ||
- | | + | <code javascript> |
+ | @@JS: | ||
+ | else '< | ||
+ | </ | ||
| | ||
What this does is display links specific for Registered Users only to them | What this does is display links specific for Registered Users only to them | ||
Line 617: | Line 640: | ||
For example: | For example: | ||
- | | + | <code javascript> |
+ | template.user_alias=user.alias; | ||
+ | </ | ||
Now '' | Now '' | ||
Line 686: | Line 711: | ||
==== XJS-specific global methods and properties ==== | ==== XJS-specific global methods and properties ==== | ||
- | The following | + | The following |
=== xjs_load(filename) === | === xjs_load(filename) === | ||
Line 699: | Line 724: | ||
check for files. | check for files. | ||
+ | {{indexmenu_n> | ||