Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| server:web [2023/11/14 19:04] – [webctrl.ini per-directory configuration file] Added snippet example and additional detail from original commit message re: Rewrite* ecbbs | server:web [2026/03/04 13:51] (current) – [Reference] mention letsyncrypt nelgin | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| The Synchronet Web Server is a mostly HTTP 1.1 compliant web server capable of | The Synchronet Web Server is a mostly HTTP 1.1 compliant web server capable of | ||
| handing basic web servicing tasks. | handing basic web servicing tasks. | ||
| - | general-purpose web server one would come to expect | + | general-purpose web server one would come to expect, including |
| It also, through Server-Side JavaScript (SSJS), allows dynamic pages to be | It also, through Server-Side JavaScript (SSJS), allows dynamic pages to be | ||
| Line 13: | Line 13: | ||
| - | ===== Configuration | + | ===== Configure |
| - | ==== Startup INI [Web] Section Keys ==== | + | The Synchronet |
| - | The '' | + | |
| + | ╔══════════════════════════════════════════════════════════════════╗ | ||
| + | ║ Web Server Settings | ||
| + | ╠══════════════════════════════════════════════════════════════════╣ | ||
| + | ║ │Enabled | ||
| + | ║ │Log Level | ||
| + | ║ │HTTP Support... | ||
| + | ║ │HTTPS Support... | ||
| + | ║ │SSJS File Extension | ||
| + | ║ │Index Filenames | ||
| + | ║ │Content Root Directory | ||
| + | ║ │Error Sub-directory | ||
| + | ║ │Virtual Host Support | ||
| + | ║ │Access Logging | ||
| + | ║ │Access Log Format | ||
| + | ║ │Max Clients | ||
| + | ║ │Max Inactivity | ||
| + | ║ │Max Concurrent Connections | ||
| + | ║ │Limit Rate of Requests | ||
| + | ║ │Authentication Methods | ||
| + | ║ │Output Buffer Drain Timeout | ||
| + | ║ │Lookup Client Hostname | ||
| + | ║ │CGI Support... | ||
| + | ║ │Filebase Support... | ||
| + | ║ │Login Requirements | ||
| + | ║ │JavaScript Settings... | ||
| + | ║ │Failed Login Attempts... | ||
| + | ╚══════════════════════════════════════════════════════════════════╝ | ||
| + | |||
| + | ... or via [[monitor: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ... or via manual edit of the '' | ||
| + | |||
| + | ==== sbbs.ini ==== | ||
| + | |||
| + | The '' | ||
| + | |||
| + | ^ Key ^ Default | ||
| + | | AutoStart | ||
| + | | HostName | ||
| + | | LogLevel | ||
| + | | TLSErrorLevel | ||
| + | | Interface | ||
| + | | TLSInterface | ||
| + | | Port | '' | ||
| + | | TLSPort | ||
| + | | BindRetryCount | ||
| + | | BindRetryDelay | ||
| + | | MaxClients | ||
| + | | MaxConcurrentConnections | 10 | Maximum number of simultaneous connections allowed from a single client IP address | | ||
| + | | MaxInactivity | ||
| + | | MaxCgiInactivity | ||
| + | | MaxRequestsPerPeriod | ||
| + | | RequestRateLimitPeriod | ||
| + | | SemFileCheckFrequency | ||
| + | | IndexFileNames | ||
| + | | RootDirectory | ||
| + | | ErrorDirectory | ||
| + | | CGIDirectory | ||
| + | | DefaultCGIContent | ||
| + | | CGIExtensions | ||
| + | | JavaScriptExtension | ||
| + | | Authentication | ||
| + | | HttpLogFile | ||
| + | | CustomLogFormat | ||
| + | | FileIndexScript | ||
| + | | FileVPathPrefix | ||
| + | | FileVPathForVHosts | ||
| + | | OutbufDrainTimeout | ||
| + | | TempDirectory | ||
| + | | LoginRequirements | ||
| + | | LoginAttempt* | ||
| + | | LoginInfoSave | ||
| + | | RemoteIPHeader | ||
| + | | Options | ||
| + | |||
| + | === Options === | ||
| + | |||
| + | The '' | ||
| + | |||
| + | Default value: **'' | ||
| + | |||
| + | In addition to the [[config: | ||
| + | |||
| + | ^ Option | ||
| + | | VIRTUAL_HOSTS | Supports name-based virtual hosts. | | ||
| + | | NO_JAVASCRIPT | Disable SSJS execution. | | ||
| + | | NO_CGI | ||
| + | | NO_HTTP | ||
| + | | NO_FILEBASE | ||
| + | | HTTP_LOGGING | ||
| + | | ONE_HTTP_LOG | ||
| + | | ALLOW_TLS | ||
| + | | HSTS_SAFE | ||
| + | | HAPROXY_PROTO | Indicate that incoming requests are via HAproxy | | ||
| + | | DEBUG_RX | ||
| + | | DEBUG_TX | ||
| + | | DEBUG_SSJS | ||
| + | |||
| + | ==== Reference ==== | ||
| + | |||
| + | Web Server configuration settings reference: | ||
| + | |||
| + | === Virtual Hosts === | ||
| + | |||
| + | If your system has multiple | ||
| + | host names, you can have each host name return unique content depending on which hostname is used. ie: if '' | ||
| + | |||
| + | A virtual host is added by simply putting the desired content into a sub-directory of [[# | ||
| + | the request host name (very old browsers, or some automated tools) they will be served out of document root. It is therefore a good idea to put links to your various virtual hosts in an '' | ||
| + | |||
| + | <code html> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | Your browser is either too old to support | ||
| + | name-based virtual hosts, or you have visited a | ||
| + | virtual hosts that is not yet configured. | ||
| + | following are hosted here:< | ||
| + | <a href=" | ||
| + | <a href=" | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| === RootDirectory === | === RootDirectory === | ||
| Line 27: | Line 154: | ||
| **NOTE**: Older versions of Synchronet had this value default to '' | **NOTE**: Older versions of Synchronet had this value default to '' | ||
| + | |||
| + | **NOTE**: If you change the root directory and use letsyncrypt for your certificate management, you will want to update the Domains section of letsyncrypt.ini in the ctrl directory. You will also need to do that if you have a virtual host so Let's Encrypt can find the correct document root. | ||
| + | |||
| === ErrorDirectory === | === ErrorDirectory === | ||
| Line 105: | Line 235: | ||
| Default value: '' | Default value: '' | ||
| - | The prefix of log files if HTTP_LOGGING is enabled | + | The prefix of HTTP access |
| - | store Common Logfile Format logs in. | + | |
| - | (if enabled, see next item), date, and '' | + | |
| - | === Options | + | === CustomLogFormat |
| - | Default value: | + | When the '' |
| - | The '' | + | When the '' |
| - | '' | + | | %% | The percent sign | |
| + | | %a | Client IP address of the request | | ||
| + | | %B | Size of response in bytes, excluding HTTP headers. | | ||
| + | | %b | Size of response in bytes, excluding HTTP headers. In CLF format | | ||
| + | | %h | Remote hostname or IP address | | ||
| + | | %H | The request protocol | | ||
| + | | %l | Remote logname (from identd, if supplied) | | ||
| + | | %p | Server TCP port number | | ||
| + | | %r | First line of request | | ||
| + | | %s | Status | | ||
| + | | %t | Time the request was received, in the format [18/ | ||
| + | | %u | Remote user if the request was authenticated | | ||
| + | | %v | The canonical ServerName of the server serving the request. (the vhost) | | ||
| + | | %{remote}p | the client's actual port | | ||
| + | | %{Referer}i | the HTTP Referer [sic] header line | | ||
| + | | %{User-agent}i | the HTTP User-agent header line | | ||
| - | Log all received data to the console log, as well as various | + | Note: Double-quote characters used in the format string do **not** need to be escaped (i.e. with a backslash) |
| - | extra bits related | + | |
| - | '' | + | Example: |
| - | Log all transmitted data except | + | This is the equivalent |
| - | as various extra bits of information related to transmitted | + | |
| - | data. | + | |
| - | '' | + | CustomLogFormat = %h %l %u %t " |
| - | Supports name-based virtual hosts. If your system has multiple | + | This is the equivalent of Apache' |
| - | host names, you can have each host name return unique content | + | |
| - | depending on which hostname is used. ie: if | + | |
| - | '' | + | |
| - | system, you could have FreeBSD-specific pages on one, and | + | |
| - | general *nix stuff on the other. | + | |
| - | A virtual host is added by simply putting the desired content | ||
| - | into a sub-directory of [[# | ||
| - | ie: '' | ||
| - | the request host name (very old browsers, or some automated | ||
| - | tools) they will be served out of document root. | ||
| - | It is therefore a good idea to put links to your various | ||
| - | virtual hosts in an '' | ||
| - | like this: | ||
| - | <code html> | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | < | ||
| - | Your browser is either too old to support | ||
| - | name-based virtual hosts, or you have visited a | ||
| - | virtual hosts that is not yet configured. | ||
| - | following are hosted here:< | ||
| - | <a href=" | ||
| - | <a href=" | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | '' | + | === FileVPathPrefix === |
| + | Default value: "" | ||
| - | Disable CGI script execution. | + | Suggested value: ''/ |
| - | '' | + | A virtual sub-directory of your web root to provide direct HTTP[S] access to your file bases. HTTP-AUTH is used for conditional access/ |
| - | Enable logging to a Common Logfile Format log as described in | + | === FileVPathForVHosts === |
| - | the HttpLogFile section. | + | Default value: '' |
| - | programs (like Webalizer: http:// | + | |
| - | '' | + | By default, virtual hosts will not have the virtual file path (if enabled). Set this to '' |
| - | Disable SSJS execution. | + | === FileIndexScript === |
| + | Default value: "" | ||
| - | '' | + | Suggested value: |
| - | Enable TLS support. | + | A Server-side JavaScript (SSJS) file to execute |
| - | + | ||
| - | '' | + | |
| - | + | ||
| - | Indicates that all URLs availabe via http are also available via https and redirects clients who want a TLS session | + | |
| ==== Other configuration files ==== | ==== Other configuration files ==== | ||
| Line 220: | Line 331: | ||
| - | ==== webctrl.ini | + | ==== webctrl.ini ==== |
| 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. | ||
| Line 227: | Line 339: | ||
| === AccessRequirements === | === AccessRequirements === | ||
| - | Specifices | + | Specifies |
| files in this directory. | files in this directory. | ||