general
Core listening parameters, operating mode, and cryptographic settings.
This page describes the basic structure of a server .mgc configuration file, the purpose of its key sections, and the parameters of the general block.
The configuration is split into logical blocks:
general — global server parameters (address, port, mode, cryptography)app — application-level server behavior settingsweb — web service parametersnet — network service parametersgeneral
Core listening parameters, operating mode, and cryptographic settings.
app
Application behavior and parameters that depend on the server type.
web
Web routing, reverse proxy, and related service settings.
net
Network service settings and low-level traffic processing.
The general block defines the server’s network and cryptographic parameters.
The app block defines application behavior, such as web, net, and other service-specific variants.
general blockThe general block contains parameters that define the basic behavior of a server instance: listening address, port, transport mode, and TLS parameters.
general: [ address: "127.0.0.1" port: 443 mode: "https" php_fpm_address: "127.0.0.1:9000" crypto_provider: "awslcrs" protocol_version: ["tls12", "tls13"]]mode: "https" + crypto_providermode: "tcp"mode: "udp"address: "127.0.0.1" + a non-standard portHTTPS reverse proxy
Use mode: "https" and specify crypto_provider and protocol_version to control TLS behavior.
Local development
For local startup, it is convenient to use 127.0.0.1 and a separate port such as 4433.
general block fields| Field | Type | Description | Example |
|---|---|---|---|
| address | string | IP address for listening for incoming connections | 127.0.0.1 |
| port | number | Server port | 443, 4433 |
| mode | string | Server operating mode (http, https, tcp, udp) | “https” |
| php_fpm_address | string | PHP-FPM address for handling PHP requests | 127.0.0.1:9000 |
| crypto_provider | string | TLS cryptographic backend implementation | ”awslcrs” |
| protocol_version | string[] | List of allowed TLS versions | [“tls12”, “tls13”] |
mode field valuesPlain HTTP without TLS encryption.
Suitable for:
HTTP over TLS.
Requires configuration of:
crypto_providerprotocol_version (recommended)Direct raw TCP mode without an HTTP layer.
Suitable for:
Direct raw UDP mode.
Suitable for:
crypto_provider field valuesawslcrs — AWS crypto library (based on BoringSSL/OpenSSL)ring — rustls-based backendmagma — GOST cryptosystemgrasshopper — GOST R 34.12-2015openssl — OpenSSLprotocol_version field valuesSupported values, for example:
tls12tls13Recommended set for modern configurations:
protocol_version: ["tls12", "tls13"]generaladdress and port.mode according to the service type.https, set crypto_provider.protocol_version.php_fpm_address if needed for PHP scenarios.Minimal example for local HTTPS development
general: [ address: "127.0.0.1" port: 4433 mode: "https" crypto_provider: "openssl" protocol_version: ["tls12", "tls13"]]