<commit_before>def _nginx_proxy_string(port_spec):
    return "proxy_pass http://{}:{};".format(port_spec['proxied_ip'], port_spec['proxied_port'])

def _nginx_location_spec(port_spec):
    """This will output the nginx location config string for speicfic port spec """
    location_string_spec = "\t \t location / { \n"
    location_string_spec += "\t \t \t {} \n".format(_nginx_proxy_string(port_spec))
    location_string_spec += "\t \t } \n"
    return location_string_spec

def _nginx_listen_string(port_spec):
    return "listen {}:{};".format(port_spec['host_address'], port_spec['host_port'])

def _nginx_server_spec(port_spec):
    """This will output the nginx server config string for speicfic port spec """
    server_string_spec = "\t server {\n"
    server_string_spec += "\t \t {}\n".format(_nginx_listen_string(port_spec))
    server_string_spec += _nginx_location_spec(port_spec)
    server_string_spec += "\t }\n"
    return server_string_spec

def get_nginx_configuration_spec(port_spec_dict):<commit_msg>Use server_name in nginx config<commit_after>def _nginx_proxy_string(port_spec):
    return "proxy_pass http://{}:{};".format(port_spec['proxied_ip'], port_spec['proxied_port'])

def _nginx_location_spec(port_spec):
    """This will output the nginx location config string for speicfic port spec """
    location_string_spec = "\t \t location / { \n"
    location_string_spec += "\t \t \t {} \n".format(_nginx_proxy_string(port_spec))
    location_string_spec += "\t \t } \n"
    return location_string_spec

def _nginx_listen_string(port_spec):
    return "listen {};".format(port_spec['host_port'])

def _nginx_server_name_string(port_spec):
    return "server_name {};".format(port_spec['host_address'])

def _nginx_server_spec(port_spec):
    """This will output the nginx server config string for speicfic port spec """
    server_string_spec = "\t server {\n"
    server_string_spec += "\t \t {}\n".format(_nginx_listen_string(port_spec))
    server_string_spec += "\t \t {}\n".format(_nginx_server_name_string(port_spec))
    server_string_spec += _nginx_location_spec(port_spec)
    server_string_spec += "\t }\n"
    return server_string_spec

def get_nginx_configuration_spec(port_spec_dict):
{'fraction_non_alphanumeric': 0.1307277628032345, 'fraction_numerical': 0.0, 'mean_word_length': 5.220670391061453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4310478', 'n_tokens_mistral': 752, 'n_tokens_neox': 750, 'n_words': 157}