Cobra Forum

Plesk Panel => Webserver => Topic started by: Suhitha on Nov 04, 2025, 05:09 AM

Title: Apache configuration shows error after removing a domain from Plesk: httpd: bad
Post by: Suhitha on Nov 04, 2025, 05:09 AM
Question: Apache configuration shows error after removing a domain from Plesk: httpd: bad user name


Applicable to:




Symptoms


   
# httpd -t
AH00543: httpd: bad user name john_doe


# apache2 -t
AH00543: apache2: bad user name john_doe


# grep john_doe /etc/passwd
#


   

# 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"

       

# 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"

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

1.Connect to the Plesk server via SSH.

2.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"

# 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"

3.Remove these files:

# rm -rf /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf


# rm -rf /etc/apache2/plesk.conf.d/vhosts/example.com.conf

4.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