Applicable to:
- Plesk for Linux
Symptoms
- Apache configuration shows the error:
-
on AlmaLinux / CloudLinux / RHEL
# httpd -t
AH00543: httpd: bad user name john_doe -
on Debian / Ubuntu
# 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 which contains this user:
-
on AlmaLinux / CloudLinux / RHEL
# 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
# 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:
PLESK_ERROR: 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 / domain was not properly removed from the system.
Resolution
- Connect to your Plesk server via SSH.
-
Find all orphaned files that belong to the nonexistent user:
# 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" -
Remove these files:
# rm -rf /etc/httpd/conf/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
- Connect to your Plesk server via SSH.
-
Find all orphaned files that belong to the nonexistent user:
# 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:
# 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
Comments
Checking Apache configuration
................................................................[ERROR]
Please sign in to leave a comment.