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

All websites are down with 502 Bad Gateway error: apache2 or httpd is not running

 
apacheapache configcentoscloudlinuxdebian

Symptoms

  • All websites on the Plesk server are showing a 502 Bad Gateway error while opened in a browser
  • Attempts to start Apache and Apache configuration tests fail with an error that is similar to the following:

    AH00526: Syntax error on line 51 of /etc/apache2/plesk.conf.d/vhosts/example.com.conf:
    SSLCertificateFile: file '/opt/psa/var/certificates/cert1Ape62' does not exist or is empty

  • The following error is shown in the Plesk GUI:

    New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert1Ape62") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert1Ape62','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

  • That SSL certificate that is reported in the error message has zero size:

    • For RHEL-based OS (CentOS, CloudLinux, RedHat:

      # ls -l /usr/local/psa/var/certificates/cert1Ape62
      ...
      -r-------- 1 root root 0 Mar 24 12:26 /opt/psa/var/certificates/cert1Ape62

    • For Debian-based OS (Debian, Ubuntu):

      # ls -l /opt/psa/var/certificates/cert1Ape62
      ...
      -r-------- 1 root root 0 Mar 24 12:26 /opt/psa/var/certificates/cert1Ape62

  • The Plesk web server reconfiguration utility fails with an error that is similar to the following:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-domain example.com
    ...
    ERR [panel] Apache config (14972022740.47990300) generation failed: Template_Exception: Syntax error on line 51 of /etc/httpd/conf/plesk.conf.d/ip_default/example.conf:
    SSLCACertificateFile: file '/usr/local/psa/var/certificates/cert1Ape62' does not exist or is empty

  • Repairing files system permissions with the plesk repair utility results in an error that is similar to the following:

    # plesk repair fs -y -v
    Checking Linux system files ......................................... [OK]
    Checking virtual hosts' file system
    There are incorrect permissions on some items in the system
    directory for the domain 'example.com' .......................... [ERROR]
    - Failed to stat
    /var/www/vhosts/system/example.com/conf/webalizer.conf: No
    such file or directory
    Repairing incorrect permissions ................................. [FAILED]
    - openat 'webalizer.conf' failed: No such file or directory
    Failed to open safely
    /var/www/vhosts/system/example.com/conf/webalizer.conf: No
    such file or directory

  • All websites on the server are not accessible, while showing a browser error that is similar to the following :

    ERR_CONNECTION_REFUSED

Cause

The SSL certificate file that is reported in the error message is missing or is corrupted, due to which it has an improper size or is not found at all.

Resolution

Note: If the domain example.com was removed previously from the server, apply the solution from the article: Apache or nginx fails to start: BIO_new_file: certificate not found: No such file or directory: nginx: configuration file /etc/nginx/nginx.conf test failed…

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

How to install the php-mcrypt module on a Plesk server

Read More »

Error in Plesk inteface: New configuration files were not created: Could not open configuration file: No such file or directory

Read More »

All websites hosted in Plesk are not accessible over HTTPS: 502 Bad Gateway or ERR_CONNECTION_REFUSED

Read More »

Apache keeps going down on a Plesk server: server reached MaxRequestWorkers setting

Read More »

Hosting Wiki

  • Cross Site Request Forgery (CSRF)
  • Cross-Origin Resource Sharing (CORS)
  • Server Redundancy
  • Postfix
  • Linux Containers
  • PostgreSQL
  • DDoS
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Hosting Control Panel
  • Plesk
  • NoSQL Database
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSL
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
  • Email Autoresponder
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
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