def editapache(self,oldmail,mail,name,oldname,charset,oldcharset,vhid):
with open(filename,'r+') as config:
config.replace(oldcharset,charset)
config.replace(oldname,name)
config.replace(oldmail,mail)
config.write(config)