initial virtual hosts support

This commit is contained in:
2025-08-09 19:43:21 +02:00
parent 0a1e36ccc8
commit 7dd0be9afc
6 changed files with 67 additions and 27 deletions

View File

@@ -19,11 +19,16 @@ int main(void) {
}
cws_config *config = cws_config_init();
if (!config) {
if (config == NULL) {
CWS_LOG_ERROR("Unable to read config file");
return EXIT_FAILURE;
}
CWS_LOG_INFO("Virtual hosts count: %d", config->virtual_hosts_count);
for (size_t i = 0; i < config->virtual_hosts_count; ++i) {
CWS_LOG_DEBUG("%s (ssl: %d)", config->virtual_hosts[i].domain, config->virtual_hosts[i].ssl);
}
CWS_LOG_INFO("Running cws on http://%s:%s...", config->hostname, config->port);
int ret = cws_server_start(config);
if (ret < 0) {