The purpose of the Zia project is to implement an Http server based on the ZiAPI api.
The server comes with several modules, including:
- a generic CGI module
- a Logger module
- an Http module implementing HTTP/1.1 protocol
- an Https module implementing HTTP/1.1 protocol with SSL
- a Static serve module
- a Reverse proxy module
- a Virtual host module
Note that all the modules based on the ZiAPI
api (v5.0.0) are compatible with our Zia server.
The server also comes wit the following features:
- A
cli
to manage the server and the pipelines
Create a build/
directory:
mkdir build/
Install the required conan packages:
conan install . --build=missing -if=build/
If you want to build the unit tests:
cmake . -DENABLE_TESTING=yes -b ./build/
Build the project with cmake:
cmake --build ./build/
All the binaries are located in the ./build/bin/
directory.
We choose the Yaml
language for the configuration files.
The pipelines configurations must be written in the pipelines.txt
file. It is formatted as follows:
pipelineName::pathToTheModulesConfigurationFile::PathsToTheLibraries
...
Each pipeline must provide a module configuration file, formatted as follows:
modules:
moduleName:
moduleParam1: moduleParam1
moduleParam2: moduleParam2
...
The modules parameters required in the configuration are documented in the Modules documentation
Run the zia
binary (located in the ./build/bin/
directory).
The cli
enables server and pipelines management. The following commands are available:
Command | Argument(s) | Description |
---|---|---|
help |
Displays the commands list | |
start |
pipelineName |
Starts the pipeline |
stop |
pipelineName |
Stops the pipeline |
config |
pipelineName |
Reloads the pipeline configuration |
hotreload |
pipelineName |
Activates or deactivates hot reloading |
httpServer::../../config.yml::../lib/libhttp_module.so
modules:
http:
port: 8080
path: http_module.dll
staticserve:
path: static_serve.dll
rootDirectory: ../../files
dirpath: .
cd ./build/bin/ && ./zia
Note: The #
followed by sentences are comments, they don't have to be written in the cli
config httpServer # first configuration of the pipeline before running
start httpServer # start the pipeline
config httpServer # config the pipeline while it's running
stop httpServer # stop the pipeline
Generate the Doxygen documentation:
doxygen Doxyfile
All the documentation will be found in the ./doc/
directory.
A script is provided to generate SSL certificates. Run:
./docs/https_module/generateCertificate.sh
All the required files will be provided in the ./build/certificate/
directory.
Aurélien BOCH | aurelien.boch@epitech.eu
Benjamin REIGNER | benjamin.reigner@epitech.eu