Function createNginxSite

  • Creates an Nginx site file and, if configured, enables it. Make sure to remember to restart nginx (sudo systemctl restart nginx) after adding a site.

    This will likely require sudo permissions if run with the default nginx dir (/etc/nginx/).

    Parameters

    • site: Readonly<NginxSite>
    • __namedParameters: Readonly<Partial<{ log: Logger; nginxDirPath: string }>>

    Returns Promise<{ outputPath: string; siteString: string }>

    Error if the site already exists.