function to replace vars in config files
template configuration files for nginx and uwsgi