Plesk

Unable to repair web configuration: mktemp: failed to create file via template ‘/etc/nginx/plesk.conf.d/server.conf.XXXXXX’: No such file or directory

Symptoms

Cause

Plesk ships its own, pre-configured nginx.

The installed nginx package corrupted or replaced with incorrect one.

Resolution

via Plesk UI

  1. Log into Plesk
  2. Go to Tools & Settings > Updates > Add/Remove Components
  3. Uninstall nginx
  4. Install it back in the same way
  5. Repair web configuration

via CLI

  1. Connect to the server via SSH

  2. Remove nginx

    # /usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --remove-component nginx

  3. Install nginx

    # plesk installer --select-release-current --install-component nginx

  4. Repair the configuration:

    # plesk repair web -y