void Server::CheckDocRoot() {
  try {
    if (!fs::exists(doc_root_) || !fs::is_directory(doc_root_)) {
      LOG_ERRO("Doc root is not an existing directory!");
      return;
    }

    if (doc_root_.is_relative()) {
      doc_root_ = fs::absolute(doc_root_);
    }

    doc_root_ = fs::canonical(doc_root_);

  } catch (fs::filesystem_error& e) {
    LOG_ERRO("Doc root error: %s", e.what());
    doc_root_.clear();
  }

  LOG_INFO("Doc root: %s", doc_root_.u8string().c_str());
}
void Server::CheckDocRoot() {
  try {
    if (!fs::exists(doc_root_) || !fs::is_directory(doc_root_)) {
      LOG_ERRO("Doc root is not an existing directory!");
      return;
    }

    if (doc_root_.is_relative()) {
      doc_root_ = fs::absolute(doc_root_);
    }

    doc_root_ = fs::canonical(doc_root_);

  } catch (fs::filesystem_error& e) {
    LOG_ERRO("Doc root error: %s", e.what());
    doc_root_.clear();
  }

  LOG_INFO("Doc root: %s", doc_root_.u8string().c_str());
}