Apache cannot start: "httpd: bad user name ..."

Created:

2016-11-16 12:40:01 UTC

Modified:

2017-04-24 12:15:59 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache cannot start: "httpd: bad user name ..."

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

  • All websites are offline.
  • Apache web server is down and cannot be restarted:

    /etc/init.d/httpd start
    Starting httpd: httpd: bad user name <user_name>
  • The following warning can be observed on Plesk Home page:

    New configuration files for the Apache web server were not created due to the errors in configuration templates: httpd: bad user name <user_name>. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

Cause

Some of the objects (subscriptions/domains) were deleted improperly leaving their config files orphaned.

Resolution

  • Check configuration files which contain record about non existing user:

    # grep '<user_name>' /etc/httpd/conf/plesk.conf.d/vhosts/*

    /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "<user_name>" "psacln"
    /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: SuexecUserGroup "<user_name>" "psacln"
    /etc/httpd/conf/plesk.conf.d/vhosts/test.example.com.conf: SuexecUserGroup "<user_name>" "psacln"
    /etc/httpd/conf/plesk.conf.d/vhosts/test.example.com.conf: SuexecUserGroup "<user_name>" "psacln"
  • Remove orphan configuration files:

    # rm /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf 
    # rm /etc/httpd/conf/plesk.conf.d/vhosts/test.example.com.conf
  • Recreate configuration files:

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

See also #213410169

Have more questions? Submit a request
Please sign in to leave a comment.