Refactor server configuration management
- Removed old server configuration files (server.json, server.log, server_config.c, server_config.h). - Introduced a new configuration file (server.conf) with a more structured format. - Implemented a configuration parser (config_parser.c) to read and apply settings from server.conf. - Updated server logic to utilize the new configuration structure. - Enhanced logging functionality and added rate limiting features. - Improved error handling and security measures in request processing.
This commit is contained in:
23
server.conf
Normal file
23
server.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
# Carbon Web Server Configuration File
|
||||
# Lines starting with # are comments
|
||||
|
||||
# Server listening port
|
||||
port = 8080
|
||||
|
||||
# Enable HTTPS (requires valid certificates in certs/ directory)
|
||||
use_https = false
|
||||
|
||||
# Log file location
|
||||
log_file = log/server.log
|
||||
|
||||
# Maximum number of worker threads
|
||||
max_threads = 4
|
||||
|
||||
# Server running state
|
||||
running = true
|
||||
|
||||
# Server name or IP address (used for logging and response headers)
|
||||
server_name = 10.0.0.206
|
||||
|
||||
# Enable verbose logging
|
||||
verbose = true
|
||||
Reference in New Issue
Block a user