Plesk

Apache config file cannot be generated on a Plesk server: Wrong variable to subsitute

Symptoms

Cause

Custom Apache virtual host templates contain a syntax error or reference to a nonexistent variable. 

Resolution

  1. Connect to the server using SSH.

  2. Move the custom templates folder to another location:

    # mv -f /usr/local/psa/admin/conf/templates/custom /root/custom_templates/

  3. Rebuild web server configuration files:

    For RHEL-based Linux distributions (CentOS, RedHat, CloudLinux):

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

    For Debian-based Linux distributions (Ubuntu, Debian):

    # /opt/psa/admin/sbin/httpdmng  --reconfigure-all

Note: Check Plesk Advanced Administration Guide to see the full list of allowed variables for custom virtual host templates.

Exit mobile version