Symptoms
-
Apache configuration shows the error:
-
on CentOS/RHEL-based distributions:
# httpd -t
AH00543: httpd: bad user name john_doe -
on Debian/Ubuntu-based distributions:
# apache2 -t
AH00543: apache2: bad user name john_doe
-
-
The user from the error (in this example, john_doe) does not exist on the system:
# grep john_doe /etc/passwd
# -
There is an Apache configuration file that contains this user:
-
On CentOS/RHEL-based distributions:
# grep -r john_doe /etc/httpd/conf/plesk.conf.d/vhosts/*
/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln" -
On Debian/Ubuntu-based distributions:
# grep -r john_doe /etc/apache2/plesk.conf.d/vhosts/*
/etc/apache2/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
/etc/apache2/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
-
-
The domain in the file name (In this example, example.com) does not appear on the Domains page in Plesk.
-
The following error message may appear on the Home page in Plesk:
New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00112: Warning: DocumentRoot [/var/www/...] does not exist AH00543: apache2: bad user name example.
Cause
The subscription/domains was not properly removed.
Resolution
-
Connect to the Plesk server via SSH.
-
Find all orphaned files that belong to the nonexistent user:
-
on CentOS/RHEL-based distributions:
# grep -r john_doe /etc/httpd/conf/plesk.conf.d/vhosts/*
/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln" -
on Debian/Ubuntu-based distributions:
# grep -r john_doe /etc/apache2/plesk.conf.d/vhosts/*
/etc/apache2/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
/etc/apache2/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "john_doe" "psacln"
-
-
Remove these files:
-
on CentOS/RHEL-based distributions:
# rm -rf /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf
-
on Debian/Ubuntu-based distributions:
# rm -rf /etc/apache2/plesk.conf.d/vhosts/example.com.conf
-
-
Regenerate web-server configuration files for all domains:
Note: If there are +300 domains on the server, run this command during server maintenance time.
# plesk repair web -y