def METHOD_NAME():
    logging.info('Configuring nginx')
    execute_commands_and_raise_on_return_code(
        [
            'sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak',
            'sudo rm /etc/nginx/nginx.conf',
            # copy is better on redhat to respect selinux context
            '(cd ../config && sudo install -m 644 $PWD/nginx.conf /etc/nginx/nginx.conf)',
            '(sudo mkdir /etc/nginx/error || true)',
            '(cd ../web_interface/templates/ && sudo ln -s $PWD/maintenance.html /etc/nginx/error/maintenance.html) || true',  # noqa: E501
        ],
        error='configuring nginx',
    )