🔨」 fix: fixed sample config

This commit is contained in:
2025-05-08 11:21:50 +02:00
parent 0be3937b33
commit 8f6875dc83
3 changed files with 2 additions and 22 deletions

View File

@ -1,9 +0,0 @@
[server]
host = "localhost"
port = 8080
[server.location./]
methods = { "GET" }
root = "/var/www/html"
dirlist = true
client_max_body_size = "10M"

View File

@ -1,9 +0,0 @@
[server]
host = "0.0.0.0"
port = 80
[server.location./]
methods = { "GET" }
root = "/var/www/html"
dirlist = true
client_max_body_size = "10M"

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/10 13:08:36 by adjoly #+# #+# */ /* Created: 2025/04/10 13:08:36 by adjoly #+# #+# */
/* Updated: 2025/05/06 19:20:57 by adjoly ### ########.fr */ /* Updated: 2025/05/08 11:21:10 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -40,9 +40,7 @@ void _generateConf(void) {
std::ofstream file(SAMPLE_CONF_PATH); std::ofstream file(SAMPLE_CONF_PATH);
if (file.is_open()) { if (file.is_open()) {
file << "[server]\nhost = \"0.0.0.0\"\nport = " file << "[server]\nhost = \"0.0.0.0\"\nport = "
"80\n\n[server.location./]\nmethods = { \"GET\" }\nroot " "80\n\n[server.location./]\ndirlist = false\n";
"= \"/var/www/html\"\ndirlist = true\nclient_max_body_size "
"= \"10M\"\n";
file.close(); file.close();
_log.info("config file successfully generated"); _log.info("config file successfully generated");
} else { } else {