def apache_conf_insert(conf, line):
    """ Crudely add apache directives near other similar directives. """
    sections = conf.split('\n\n')
    directive, value = line.split(' ', 1)
    added = False
    for scount in range(len(sections)):
        if sections[scount].find(directive) >= 0:
            if sections[scount].find(line) < 0:
                sections[scount] += '\n' + line
            added = True
            break
    if not added:
        sections.append(line)
    return '\n\n'.join(sections)
