diff --git a/pages/docs/api/non-proxy-api.md b/pages/docs/api/non-proxy-api.md index d4e2757..e020db1 100644 --- a/pages/docs/api/non-proxy-api.md +++ b/pages/docs/api/non-proxy-api.md @@ -1,4 +1,8 @@ -### Non-proxy API +--- +title: Non-proxy API (legacy) +--- + +### Non-proxy API (legacy) This API is exposed both to mods and server-side JavaScript. This API also includes proxy requests, which don't use CONNECT method. It's possible to determine, if the request comes from the proxy, by checking if _req.url_ begins with "_http://_" or with "_https://_" (unlike non-proxy requests, for which _req.url_ begins with "_/_") like this: diff --git a/pages/docs/api/proxy-api.md b/pages/docs/api/proxy-api.md index da4743e..5575464 100644 --- a/pages/docs/api/proxy-api.md +++ b/pages/docs/api/proxy-api.md @@ -1,4 +1,8 @@ -### Proxy API +--- +title: Proxy API (legacy) +--- + +### Proxy API (legacy) _Added in SVR.JS 3.4.21, 3.7.0_{" "} diff --git a/pages/docs/api/proxy-callback.md b/pages/docs/api/proxy-callback.md index 5d517c7..1df4c7c 100644 --- a/pages/docs/api/proxy-callback.md +++ b/pages/docs/api/proxy-callback.md @@ -1,3 +1,7 @@ +--- +title: Proxy callback API (module.exports.proxy) +--- + ### Proxy callback API (`module.exports.proxy`) _Added in SVR.JS 4.0.0_{" "} diff --git a/pages/docs/api/svrjs-api-legacy.md b/pages/docs/api/svrjs-api-legacy.md index c461a71..ea16b49 100644 --- a/pages/docs/api/svrjs-api-legacy.md +++ b/pages/docs/api/svrjs-api-legacy.md @@ -1,3 +1,7 @@ +--- +title: SVR.JS API (.tar.gz mods and server-side JavaScript) +--- + ## SVR.JS API (_.tar.gz_ mods and server-side JavaScript) SVR.JS has its API for both _.tar.gz_ mods and server-side JavaScript that expands its functionality. SVR.JS API extends vanilla Node.JS HTTP API. diff --git a/pages/docs/api/svrjs-api.md b/pages/docs/api/svrjs-api.md index 1743022..776933b 100644 --- a/pages/docs/api/svrjs-api.md +++ b/pages/docs/api/svrjs-api.md @@ -1,3 +1,7 @@ +--- +title: SVR.JS API (.js mods) +--- + ## SVR.JS API (_.js_ mods) SVR.JS has its API for _.js_ mods that expands its functionality. SVR.JS API extends vanilla Node.JS HTTP API. diff --git a/pages/docs/config/cgi-scgi-jsgi-php.md b/pages/docs/config/cgi-scgi-jsgi-php.md index a72f987..b615c46 100644 --- a/pages/docs/config/cgi-scgi-jsgi-php.md +++ b/pages/docs/config/cgi-scgi-jsgi-php.md @@ -1,3 +1,7 @@ +--- +title: CGI/SCGI/JSGI/PHP +--- + ### CGI/SCGI/JSGI/PHP In order to use CGI with SVR.JS, you need to install RedBrick mod. For SCGI you need to install OrangeCircle, while for JSGI you need to install YellowSquare mod. [Download these mods.](https://svrjs.org/mods) diff --git a/pages/docs/config/cli-options.md b/pages/docs/config/cli-options.md index fc1c0d4..30f3575 100644 --- a/pages/docs/config/cli-options.md +++ b/pages/docs/config/cli-options.md @@ -1,3 +1,7 @@ +--- +title: CLI options +--- + ### CLI options - _-h_, _-?_, _/h_, _/?_ or _--help_ - displays help diff --git a/pages/docs/config/client-secure.md b/pages/docs/config/client-secure.md index f9084f4..57a370b 100644 --- a/pages/docs/config/client-secure.md +++ b/pages/docs/config/client-secure.md @@ -1,3 +1,7 @@ +--- +title: Client-initiated secure renegotiation +--- + ### Client-initiated secure renegotiation Client-initiated secure renegotiation may pose DoS risks. However, Node.JS (JS runtime on which SVR.JS is running on) has built-in protection against DoS attacks caused by client-initiated secure renegotiation. Such attacks can be detected by looking for _ERR_TLS_SESSION_ATTACK_ errors in server log. diff --git a/pages/docs/config/configuration.md b/pages/docs/config/configuration.md index 8326c3e..d8f2c8f 100644 --- a/pages/docs/config/configuration.md +++ b/pages/docs/config/configuration.md @@ -1,5 +1,5 @@ --- -title: config.json properties +title: Configuration --- ## Configuration diff --git a/pages/docs/config/custom-error.md b/pages/docs/config/custom-error.md index c6c13fa..d1f7d19 100644 --- a/pages/docs/config/custom-error.md +++ b/pages/docs/config/custom-error.md @@ -1,3 +1,7 @@ +--- +title: Custom error pages +--- + ### Custom error pages You can configure SVR.JS to serve custom error pages by adding _.<errorcode>_ (SVR.JS 3.0.0 or newer) or _<errorcode>.html_ pages. For the 404 error, you can specify it by changing the _page404_ property in _config.json_. From SVR.JS 3.8.0 onwards, you can use _errorPages_ property in _config.json_ to specify path to each custom error page. diff --git a/pages/docs/config/environment.md b/pages/docs/config/environment.md index e0ad917..cb286fa 100644 --- a/pages/docs/config/environment.md +++ b/pages/docs/config/environment.md @@ -1,3 +1,7 @@ +--- +title: Environment variables +--- + ### Environment variables #### SVR.JS 3.12.0 and newer diff --git a/pages/docs/config/forward-proxy-notes.md b/pages/docs/config/forward-proxy-notes.md index 07e9885..00d984e 100644 --- a/pages/docs/config/forward-proxy-notes.md +++ b/pages/docs/config/forward-proxy-notes.md @@ -1,3 +1,7 @@ +--- +title: Forward proxy notes +--- + ### Forward proxy notes In order to use SVR.JS as a forward proxy, you need to install forward-proxy-mod SVR.JS mod. [Download this mod.](https://svrjs.org/mods) diff --git a/pages/docs/config/http-auth.md b/pages/docs/config/http-auth.md index 9fff193..47fdd02 100644 --- a/pages/docs/config/http-auth.md +++ b/pages/docs/config/http-auth.md @@ -1,3 +1,7 @@ +--- +title: HTTP authentication +--- + ### HTTP authentication You can add HTTP basic authentication by including a 401 code (with _scode_ property set to 401) entry in the _nonStandardCodes_ property of _config.json_. To enable HTTP basic authentication, you need to specify the URL you want to restrict in the _url_ or _regex_ property of the entry. Additionally, you can set the authentication realm in the _realm_ property. If the realm is not specified, the default realm is "_SVR.JS HTTP Basic Authorization_". The encoding used for authentication will always be UTF-8. diff --git a/pages/docs/config/page-customization.md b/pages/docs/config/page-customization.md index d98af3d..6ddef61 100644 --- a/pages/docs/config/page-customization.md +++ b/pages/docs/config/page-customization.md @@ -1,3 +1,7 @@ +--- +title: Page customization +--- + ### Page customization You can easily customize the appearance of pages served by SVR.JS by adding custom head and foot sections. These sections can be linked to every _.html_ file served by SVR.JS. diff --git a/pages/docs/config/redirects.md b/pages/docs/config/redirects.md index ac9562c..3f79a5f 100644 --- a/pages/docs/config/redirects.md +++ b/pages/docs/config/redirects.md @@ -1,3 +1,7 @@ +--- +title: Redirects +--- + # Redirects Setting up HTTP redirects is simple with SVR.JS. You can add a 301 or 302 code (with `scode` property set to 301 or 302) entry to the `nonStandardCodes` property in `config.json`. The entry should specify the source URL for the redirect in the `url` or regular expression string for the redirect in `regex` property (for example `"/\\/blog($|[#?\\/].*)/"`), and the destination URL in the `location` property (for regular expressions, you can use for example `"$1"` for contents of the first capturing group). Destination location can be relative to the current site (for example `/blogs`) or a full URL (for example `https://blog.example.com`). diff --git a/pages/docs/config/reverse-proxy-config.md b/pages/docs/config/reverse-proxy-config.md index d205067..ee2ad5b 100644 --- a/pages/docs/config/reverse-proxy-config.md +++ b/pages/docs/config/reverse-proxy-config.md @@ -1,3 +1,7 @@ +--- +title: Reverse proxy configuration +--- + ### Reverse proxy configuration In order to use SVR.JS as a reverse proxy, you need to install reverse-proxy-mod SVR.JS mod. [Download this mod.](https://svrjs.org/mods) diff --git a/pages/docs/config/user-management.md b/pages/docs/config/user-management.md index 5b8c0ab..7ad447d 100644 --- a/pages/docs/config/user-management.md +++ b/pages/docs/config/user-management.md @@ -1,3 +1,7 @@ +--- +title: User management +--- + ### User management You can manage users for HTTP authentication in SVR.JS by using _svrpasswd.js_ tool (SVR.JS 3.0.0 or newer). Usage is `node svrpasswd.js [-h] [--help] [-?] [/h] [/?] [-x] [-a|--add|-d|--delete] `. Command-line options: diff --git a/pages/docs/config/virtual-hosts.md b/pages/docs/config/virtual-hosts.md index 13440d3..7e206ac 100644 --- a/pages/docs/config/virtual-hosts.md +++ b/pages/docs/config/virtual-hosts.md @@ -1,3 +1,7 @@ +--- +title: Virtual hosts +--- + ### Virtual hosts When you're not planning to use SVR.JS server-side JavaScript or SVR.JS mods implementing individual web applications and plan to use SVR.JS similarly to Apache, nginx or IIS (static-only, PHP, CGI or JSGI), you can use virtual host-like functionality (name-based; IP-based from SVR.JS 3.14.1 and newer) with SVR.JS 3.8.0 or newer. diff --git a/pages/docs/getting-started/installation.md b/pages/docs/getting-started/installation.md index 4c901b1..04eef8f 100644 --- a/pages/docs/getting-started/installation.md +++ b/pages/docs/getting-started/installation.md @@ -1,3 +1,7 @@ +--- +title: Installation +--- + ### Installation #### Using SVR.JS installer (installer packages made in April 5, 2024 and later; GNU/Linux only) diff --git a/pages/docs/getting-started/svrjs-commands.md b/pages/docs/getting-started/svrjs-commands.md index 746fcd6..6b5e34c 100644 --- a/pages/docs/getting-started/svrjs-commands.md +++ b/pages/docs/getting-started/svrjs-commands.md @@ -1,3 +1,7 @@ +--- +title: SVR.JS commands +--- + ### SVR.JS commands SVR.JS comes with a console interface that provides several built-in commands for managing the server and interacting with it. diff --git a/pages/docs/getting-started/svrjs-files.md b/pages/docs/getting-started/svrjs-files.md index bd85e43..c046bbd 100644 --- a/pages/docs/getting-started/svrjs-files.md +++ b/pages/docs/getting-started/svrjs-files.md @@ -1,5 +1,5 @@ --- -title: SVR.JS File System +title: SVR.JS files --- ### SVR.JS files diff --git a/pages/docs/getting-started/updating-svrjs.md b/pages/docs/getting-started/updating-svrjs.md index a6390a3..18d7be3 100644 --- a/pages/docs/getting-started/updating-svrjs.md +++ b/pages/docs/getting-started/updating-svrjs.md @@ -1,3 +1,7 @@ +--- +title: Updating SVR.JS +--- + ### Updating SVR.JS #### Using SVR.JS updater (included in SVR.JS installer package; GNU/Linux only) diff --git a/pages/docs/mods/installation.md b/pages/docs/mods/installation.md index f985e12..1b7dafe 100644 --- a/pages/docs/mods/installation.md +++ b/pages/docs/mods/installation.md @@ -1,3 +1,7 @@ +--- +title: Mod installation +--- + ## Mods Mods in SVR.JS are custom modules that can extend the server's functionality. Using mods, you can extend SVR.JS functionality to suit your specific requirements and customize the server's behavior to handle different types of requests. diff --git a/pages/docs/mods/mod-development.md b/pages/docs/mods/mod-development.md index a76aa14..4f0a89b 100644 --- a/pages/docs/mods/mod-development.md +++ b/pages/docs/mods/mod-development.md @@ -1,3 +1,7 @@ +--- +title: Mod development +--- + ### Mod development (_.js_ mods) This section provides a comprehensive guide on developing `.js` mods for SVR.JS. Mods allow you to extend the functionality of SVR.JS by writing custom JavaScript code. diff --git a/pages/docs/mods/mod-files.md b/pages/docs/mods/mod-files.md index 44e2e99..66029fa 100644 --- a/pages/docs/mods/mod-files.md +++ b/pages/docs/mods/mod-files.md @@ -1,3 +1,7 @@ +--- +title: Mod files +--- + ### Mod files (_.tar.gz_ mods) 1. _index.js_ - main script for mod diff --git a/pages/docs/mods/mod-loading-order.md b/pages/docs/mods/mod-loading-order.md index 73f2a89..84ade1a 100644 --- a/pages/docs/mods/mod-loading-order.md +++ b/pages/docs/mods/mod-loading-order.md @@ -1,3 +1,7 @@ +--- +title: Mod loading order +--- + ### Mod loading order #### Startup diff --git a/pages/docs/server-side-javascript/migration.md b/pages/docs/server-side-javascript/migration.md index 60a2652..1993224 100644 --- a/pages/docs/server-side-javascript/migration.md +++ b/pages/docs/server-side-javascript/migration.md @@ -1,3 +1,7 @@ +--- +title: Migration to SVR.JS +--- + ### Migration to SVR.JS If you have previously built your web application using the Node.JS http library, Express framework, or Koa framework, you can easily migrate that code to SVR.JS server-side JavaScript. diff --git a/pages/docs/server-side-javascript/svrjs-ssjs.mdx b/pages/docs/server-side-javascript/svrjs-ssjs.md similarity index 98% rename from pages/docs/server-side-javascript/svrjs-ssjs.mdx rename to pages/docs/server-side-javascript/svrjs-ssjs.md index d3cb70b..59ac67d 100644 --- a/pages/docs/server-side-javascript/svrjs-ssjs.mdx +++ b/pages/docs/server-side-javascript/svrjs-ssjs.md @@ -1,3 +1,7 @@ +--- +title: Server-side JavaScript +--- + ## Server-side JavaScript Another way to expand SVR.JS functionality is through server-side JavaScript located in _serverSideScript.js_ file inside SVR.JS web root (or locaten in SVR.JS installation directory if you're running SVR.JS 3.9.0 or newer, and you have set _useWebRootServerSideScript_ property to _false_). Server-side JavaScript allows you to create various web applications using JavaScript, Node.JS and SVR.JS API.