Articles in this section

Subdomains on Plesk server showing Server Default page after creation

Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • Subdomains after creation and some existing subdomains showing Server Default page.

  • LiteSpeed extension and webserver installed:

    # service httpd status
    litespeed is running with PID 51813

  • There are many domains with broken web configuration file in Webserver Configuration Troubleshooter

  • Apache reconfiguration fails with errors:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
    Warning: DocumentRoot [/var/www/vhosts/example.com/example2.com] does not exist
    Syntax error on line 49 of /etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf:
    SSLCACertificateFile: file '/usr/local/psa/var/certificates/certO6cmTF' does not exist or is empty

  • The command plesk repair web -sslcerts did not help

Cause

Apache configuration is broken, thus, Litespeed directly reads Apache Configuration and since Apache configuration is not being generated on the server, Litespeed won't be able to read it.

Resolution

  1. Connect to the server via SSH.

  2. Switch to Apache web server using the following command:

    # /usr/local/lsws/admin/misc/cp_switch_ws.sh apache

  3. Fix certificate error by proceeding with the following solution

    if the domain is still present on the server:

    Create the missing certificate file mentioned in the error message by copying any of the existing certificates under /usr/local/psa/var/certificates/:

    1. List certificate files:

      # ls -la /usr/local/psa/var/certificates/
      total 20
      ...
      -r-------- 1 psaadm psaadm 5024 Jun 2 15:48 cert5RtOCpu

    2. Copy any of the certificate files into new one:

      # cp /usr/local/psa/var/certificates/cert5RtOCpu /usr/local/psa/var/certificates/certO6cmTF

    Note: If the domain was removed previously from the server, apply the solution from the article.

  4. Fix DocumentRoot error by creating missing directories as in the article.

  5. Try to start Apache with the following command:

    # service apache start

  6. Repeat steps 3-5 if errors for other domains show up.

  7. After Apache started, reconfigure webserver configuration files:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all

  8. Switch back to LiteSpeed:

    # /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.