Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

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

 
2021apacheapache configautoinstallercli

Symptoms

  • It is not possible to restore website configuration with the error:

    ERR [panel] Apache config
    (16100623580.33783700) generation failed: Template_Exception:
    mkdir: cannot create directory '/etc/nginx/plesk.conf.d': No
    such file or directory
    mktemp: failed to create file via template
    '/etc/nginx/plesk.conf.d/server.conf.XXXXXX': No such file or
    directory
    Can not create temporary file

    file:
    /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
    line: 75
    code: 0
    mkdir: cannot create directory '/etc/nginx/plesk.conf.d': No
    such file or directory
    mktemp: failed to create file via template
    '/etc/nginx/plesk.conf.d/server.conf.XXXXXX': No such file or
    directory
    Can not create temporary file

  • Test nginx configuration fails:

    # nginx -t
    nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
    2021/01/08 04:02:22 [emerg] 32934#0: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
    nginx: configuration file /etc/nginx/nginx.conf test failed

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

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »

Top Web Servers For Linux And Windows

Read More »
Knowledge Base

[BUG] nginx shows configuration error in Plesk: “proxy_read_timeout” directive is duplicate

Read More »

curl shows error on Plesk server: Could not resolve host: example.com: Name or service not known

Read More »

Webserver Configurations Troubleshooter detects extra configuration or shows a false positive report on the Home page

Read More »

After switching a website to FPM served by nginx in Plesk, it fails to load with “404 Not Found” on all pages except start page

Read More »

Hosting Wiki

  • Django
  • CLI
  • Server Redundancy
  • Google Cloud CDN
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • MongoDB
  • Plesk
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family