π οΈ hix.json Configuration¶
All HIX configuration lives in a single hix.json file located alongside
the server executable. It works the same for using HIX in basic mode
(programmatic routes, manual templates) as for HixStyle mode
(MVC engine, loaders, views, controllers).
Column convention¶
In the master table each parameter has two environment-marking columns:
| Column | Meaning |
|---|---|
| Basic | Affects the server in basic HIX mode (programmatic Harbour routes + static files) |
| HixStyle | Affects the server in HixStyle mode (enabled = true) |
β = the parameter is relevant in that environment. β = the parameter has no effect or is not used in that environment.
The keys marked only under HixStyle are:
- The entire
hixstylesection
The rest affects both environments equally.
Master parameter table¶
| Section | Key | Default | Basic | HixStyle | Description |
|---|---|---|---|---|---|
server |
host |
localhost |
β | β | Listen interface. 0.0.0.0 = all. localhost = local only. |
server |
port |
80 |
β | β | TCP port. Ports < 1024 require admin/root. |
server |
maxconn |
1024 |
β | β | Maximum simultaneous connections. |
server |
timeout |
30 |
β | β | Connection timeout (seconds). |
server |
name |
HIX/2.1 |
β | β | HTTP header value Server:. |
server |
mode |
standalone |
β | β | standalone or proxied (behind nginx/Apache). |
server |
trusted_proxies |
127.0.0.1 ::1 |
β | β | Trusted IPs/CIDR, space-separated (mode=proxied). |
server |
ssl |
false |
β | β | Enables TLS. Requires cert_private + cert_public. |
server |
cert_private |
"" |
β | β | Private key filename .key (inside paths.certs). |
server |
cert_public |
"" |
β | β | Certificate filename .crt (inside paths.certs). |
server |
gzip |
true |
β | β | Compresses HTTP responses. |
server |
gzip_min_size |
2048 |
β | β | Minimum body size to compress (bytes). |
server |
autostart |
true |
β | β | Opens the browser at the server URL on startup. |
server |
exec_timeout_ms |
30000 |
β | β | Maximum execution time for .prg/.hrb (ms). 0 = no limit. |
paths |
root |
www |
β | β | Document root. |
paths |
log |
.logs |
β | β | Logs directory. |
paths |
tmp |
tmp |
β | β | Temp files (uploads, transpiles). |
paths |
errors |
.logs |
β | β | Custom HTTP error pages. |
paths |
session |
.sessions |
β | β | Session storage (storage=file). |
paths |
certs |
certs |
β | β | SSL/TLS certificates directory. |
app |
errorsys |
"" |
β | β | HTML template for the errorsys screen (relative to root/). Empty = use built-in. |
app |
default_page |
index.html |
β | β | Default resource when the URL has no file. |
app |
dispatch_mode |
full |
β | β | routes (programmatic only) / static (+ files) / full (+ prg/hrb). |
app |
auto_close_dbf |
true |
β | β | Closes open DBFs at the end of the request. |
app |
auto_close_dbf_log |
false |
β | β | Logs every auto-close of DBF. |
app |
env |
dev |
β | β | dev (detailed errors) / prod (generic errors). |
app |
debug |
false |
β | β | true = DEBUG level to console. |
admin |
enabled |
true |
β | β | false = disables the admin panel and all /hix-* routes. |
admin |
user |
"" |
β | β | Admin user. |
admin |
password |
"" |
β | β | MD5 hash of the password. Empty = shows /hix-setup. |
admin |
secret |
"" |
β | β | Cookie signing key, auto-generated by /hix-setup. |
detector |
workers |
4 |
β | β | Workers that detect protocol on each new connection. |
detector |
queue_size |
256 |
β | β | Internal queue. |
detector |
peek_timeout_ms |
100 |
β | β | Maximum wait for first byte. LAN=10, internet=50. |
detector |
peek_bytes |
512 |
β | β | Bytes to read to identify the protocol. |
pool_http |
workers |
64 |
β | β | HTTP workers (~1MB stack/thread on Windows). |
pool_http |
queue_size |
256 |
β | β | Queue of pending requests. |
pool_http |
read_timeout_ms |
2000 |
β | β | HTTP header read timeout (ms). |
pool_http |
keep_alive |
true |
β | β | Enables HTTP Keep-Alive. |
pool_http |
keep_alive_max |
100 |
β | β | Maximum requests per keep-alive connection. |
pool_ws |
workers |
100 |
β | β | WebSocket workers. Each active WS uses 1 worker until closed. |
pool_ws |
queue_size |
256 |
β | β | Queue of pending connections. |
pool_ws |
ping_interval_s |
30 |
β | β | Client ping interval (seconds). |
pool_ws |
ping_timeout_s |
10 |
β | β | Ping response timeout (seconds). |
pool_rest |
workers_sse |
20 |
β | β | Workers for Server-Sent Events (each SSE takes 1). |
pool_rest |
workers_longpoll |
10 |
β | β | Workers for Long Polling. |
pool_rest |
queue_size |
128 |
β | β | Shared queue. |
pool_rest |
stream_timeout_s |
3600 |
β | β | Maximum duration of an open stream (seconds). |
pool_hix |
workers |
4 |
β | β | Workers dedicated to the internal HIX channel. |
pool_hix |
queue_size |
64 |
β | β | HIX pool queue. |
pool_hix |
read_timeout_ms |
2000 |
β | β | Read timeout (ms). |
session |
storage |
memory |
β | β | memory (volatile, fast) / file (persistent). |
session |
prefix |
sess_ |
β | β | Session file name prefix. |
session |
crypt |
false |
β | β | Encrypts session data on disk. |
session |
seed |
"" |
β | β | Encryption key (required if crypt=true). |
session |
lifetime |
60 |
β | β | Session lifetime in minutes (applies to user and admin cookie). 0 = unlimited. |
session |
gc_days |
3 |
β | β | Days for GC of orphaned session files (only storage=file). |
monitor |
enabled |
true |
β | β | Enables the health monitor thread. |
monitor |
interval_s |
5 |
β | β | Check interval (seconds). |
monitor |
alert_pct |
75 |
β | β | % queue usage that triggers the SATURATED alert. |
log |
file |
hix.log |
β | β | Log filename (path = paths.log). |
log |
level |
info |
β | β | debug / info / warn / error / fatal. |
log |
console |
true |
β | β | true = duplicates output to console. |
log |
max_size_mb |
10 |
β | β | Maximum size before rotation (MB). |
log |
max_files |
0 |
β | β | Maximum retained backups. 0 = unlimited. |
access_log |
enabled |
true |
β | β | Enables the HTTP access log (Common Log Format). |
access_log |
file |
access.log |
β | β | Access log filename (path = paths.log). |
firewall |
mode |
blacklist |
β | β | blacklist (blocks listed) / whitelist (listed only). |
firewall |
filter |
"" |
β | β | Comma-separated list of IP/CIDR. E.g.: 192.168.1.0/24, 10.0.0.0/8. |
hixstyle |
enabled |
false |
β | β | Enables the MVC HixStyle engine. |
hixstyle |
cache_disk |
true |
β | β | Caches compiled views to disk (.cached/views/). |
hixstyle |
trace |
false |
β | β | Enables HixStyle trace in the log. |
hixstyle |
cache_ram |
false |
β | β | Global view cache in shared RAM across workers. ~10Γ faster than disk. |
trace |
app |
true |
β | β | Trace of module app. |
trace |
server |
true |
β | β | Trace of module server. |
trace |
worker_http |
false |
β | β | Trace of HTTP worker. |
trace |
worker_ws |
false |
β | β | Trace of WebSocket worker. |
trace |
worker_otros |
false |
β | β | Trace of SSE/LongPoll worker. |
trace |
pool |
false |
β | β | Trace of pools. |
trace |
pool_detector |
false |
β | β | Trace of protocol detector. |
trace |
metrics |
false |
β | β | Trace of metrics module. |
trace |
config |
false |
β | β | Trace of configuration loading. |
trace |
socket |
false |
β | β | Trace of socket operations. |
trace |
monitor |
false |
β | β | Trace of monitor. |
trace |
response |
false |
β | β | Trace of response module. |
trace |
logger |
false |
β | β | Trace of the logger itself. |
trace |
error |
false |
β | β | Trace of errors. |
Hot-toggle trace:
GET /hix-trace?mod=<module>&on=1.WARN/ERROR/FATALare always logged, regardless of trace.
Section summary¶
server - network and identity¶
Defines how the server listens: interface, port, TLS, and mode (standalone or behind a proxy). Set before the first production startup.
paths - disk layout¶
Server root structure. Change if you want to relocate www/, logs, or
sessions to another drive.
app - application¶
errorsys template for the system error screen, env (dev/prod),
debug, dispatcher, execution timeout, default page. Custom error pages live in the fixed folder
<paths.root>/errors/. The file
<paths.root>/config.json (optional) and the folder
<paths.root>/loaders/ (optional) are loaded automatically if they exist.
admin - /hix-* panel¶
Admin panel credentials. If you leave password empty, the first access to
/hix-setup sets it up. enabled = false turns off all /hix-* routes.
detector, pool_http, pool_ws, pool_rest, pool_hix - concurrency¶
Pool and queue sizes. Defaults handle medium traffic; adjust if the
monitor reports saturation (SATURATED when the queue exceeds alert_pct).
session - HTTP sessions¶
memory is the fastest but is lost on restart. file persists but
adds I/O. For multi-process always use file with seed.
monitor, log, access_log - observability¶
Main logger with rotation, CLF access log, and health monitor exposing
/hix-status. See also: sistema/logger,
sistema/metricas.
firewall - IP filtering¶
Whitelist or blacklist of IPs/CIDR. See hixstyle/seguridad/firewall.
hixstyle - MVC engine¶
Enables and tunes HixStyle. Applies only if enabled = true.
trace - per-module verbosity¶
Binary flags to enable traces for each core module. Useful for diagnosing specific problems without flooding the log.
Although many parameters are visible, this is just the definition of a web server's parameters. You should not change these parameters unless you know exactly what they do. Don't worry at first: everything is already configured.