This version of nginx is adapted for KasperskyOS.
The nginx web server for KasperskyOS is based on the nginx 1.25.1. Please refer to the http://nginx.org/en/docs/ for more information that are not related to this project.
For the nginx web server for KasperskyOS the number of worker processes can only be 1. The worker_processes
directive in the nginx configuration file is ignored.
For additional details on KasperskyOS, including its limitations and known issues, please refer to the KasperskyOS Community Edition Online Help.
- Install the KasperskyOS Community Edition SDK. You can download the latest version of KasperskyOS Community Edition for free from os.kaspersky.com. Minimum required version of the KasperskyOS Community Edition SDK is 1.2. For more information, see System requirements.
- Copy project sources files to your home directory. All files that are required to build the nginx web server for KasperskyOS and examples of KasperskyOS-based solutions are located in the following directory:
./kos
- Set the environment variable
SDK_PREFIX
to/opt/KasperskyOS-Community-Edition-<version>
, whereversion
is the version of the KasperskyOS Community Edition SDK that you installed. To do this, run the following command:$ export SDK_PREFIX=/opt/KasperskyOS-Community-Edition-<version>
Run the following script to build the nginx web server for KasperskyOS:
./kos/nginx/cross-build.sh
The nginx web server for KasperskyOS is built using the CMake build system, which is provided in the KasperskyOS Community Edition SDK.
To install the nginx web server for KasperskyOS to the KasperskyOS Community Edition SDK, run the following script with root privileges:
./kos/nginx/install.sh
To remove the nginx web server for KasperskyOS from the KasperskyOS Community Edition SDK, run the following script with root privileges:
./kos/nginx/uninstall.sh
When you develop a KasperskyOS-based solution, use the recommended structure of project directories to simplify usage of CMake scripts.
To include the nginx web server in your KasperskyOS-based solution, follow these steps:
- Add the
find_package()
command to the./CMakeLists.txt
root file to find and load thenginx
package.For more information about thefind_package (nginx REQUIRED)
./CMakeLists.txt
root file, see KasperskyOS Community Edition Online Help. - Add the
Nginx
program to a list of program executable files defined in the./einit/CMakeLists.txt
file as follows:For more information about theset (ENTITIES Nginx ...)
./einit/CMakeLists.txt
file for building theEinit
initializing program, see the KasperskyOS Community Edition Online Help. - Specify a list of IPC channels that connect the
Nginx
program toVfsNet
andVfsRamFs
programs in the./einit/src/init.yaml.in
template file. For more information about theinit.yaml.in
template file, see the KasperskyOS Community Edition Online Help. - Create a solution security policy description in the
./einit/src/security.psl.in
template file. For more information about thesecurity.psl.in
template file, see the KasperskyOS Community Edition Online Help. - Add nginx configuration files to the directory
./resources
.
You can review the example of developing a solution using nginx web server in KasperskyOS in the ./kos/example
directory.
Only KasperskyOS-specific changes can be approved. See CONTRIBUTING.md for detailed instructions on code contribution.
This project is licensed under the terms of the nginx license. See LICENSE for more information.