- IniSection& sect = ini.getSection("global");
- std::vector<std::string> keys = sect.getKeys();
- std::vector<std::string>::iterator i;
- for (i = keys.begin(); i < keys.end(); i++) {
- std::string key = *i;
- std::string value = sect.getValue(key);
-
- if (key == "logfile")
- this->logfile = value;
- else if (key == "webserver_user")
- this->webserver_user = value;
- else if (key == "docroot")
- this->docroot = value;
- else if (key == "allow_file_group_writeable")
- this->allow_file_group_writeable = this->strToBool(value);
- else if (key == "allow_directory_group_writeable")
- this->allow_directory_group_writeable = this->strToBool(value);
- else if (key == "allow_file_others_writeable")
- this->allow_file_others_writeable = this->strToBool(value);
- else if (key == "allow_directory_others_writeable")
- this->allow_directory_others_writeable =
- this->strToBool(value);
- else if (key == "check_vhost_docroot")
- this->check_vhost_docroot = this->strToBool(value);
- else if (key == "errors_to_browser")
- this->errors_to_browser = this->strToBool(value);
- else if (key == "env_path")
- this->env_path = value;
- else if (key == "loglevel")
- this->loglevel = this->strToLogLevel(value);
- else if (key == "min_uid")
- this->min_uid = Util::strToInt(value);
- else if (key == "min_gid")
- this->min_gid = Util::strToInt(value);
- else if (key == "umask")
- this->umask = Util::octalStrToInt(value);
- else if (key == "chroot")
- this->chroot_path = value;
- else
- throw ParsingException("Unknown option \"" + key +
- "\" in section [global]",
- __FILE__, __LINE__);
- }
+ const IniSection& sect = ini.getSection("global");
+ const std::vector<std::string> keys = sect.getKeys();
+ std::vector<std::string>::const_iterator i;
+ for (i = keys.begin(); i < keys.end(); i++) {
+ std::string key = *i;
+ std::string value = sect.getValue(key);
+
+ if (key == "logfile")
+ this->logfile = value;
+ else if (key == "webserver_user")
+ this->webserver_user = value;
+ else if (key == "docroot") {
+ this->docroots = sect.getValues(key);
+ } else if (key == "allow_file_group_writeable")
+ this->allow_file_group_writeable = this->strToBool(value);
+ else if (key == "allow_directory_group_writeable")
+ this->allow_directory_group_writeable = this->strToBool(value);
+ else if (key == "allow_file_others_writeable")
+ this->allow_file_others_writeable = this->strToBool(value);
+ else if (key == "allow_directory_others_writeable")
+ this->allow_directory_others_writeable =
+ this->strToBool(value);
+ else if (key == "check_vhost_docroot")
+ this->check_vhost_docroot = this->strToBool(value);
+ else if (key == "errors_to_browser")
+ this->errors_to_browser = this->strToBool(value);
+ else if (key == "env_path")
+ this->env_path = value;
+ else if (key == "loglevel")
+ this->loglevel = this->strToLogLevel(value);
+ else if (key == "min_uid")
+ this->min_uid = Util::strToInt(value);
+ else if (key == "min_gid")
+ this->min_gid = Util::strToInt(value);
+ else if (key == "umask")
+ this->umask = Util::octalStrToInt(value);
+ else if (key == "chroot")
+ this->chroot_path = value;
+ else
+ throw ParsingException("Unknown option \"" + key +
+ "\" in section [global]",
+ __FILE__, __LINE__);
+ }