Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: apache2: bad user name ${APACHE_RUN_USER}

  1. #11
    Join Date
    Aug 2008
    Beans
    1

    Re: apache2: bad user name ${APACHE_RUN_USER}

    "...try "sudo /etc/init.d/apache2 restart"..."

    Thanks! I had the same problem, but everything's OK now. I agree that values should be read from envvars.

  2. #12
    Join Date
    Jun 2007
    Location
    Amsterdam
    Beans
    5

    Re: apache2: bad user name ${APACHE_RUN_USER}

    You may still need to run sudo apache2 directly if you need certain command line options, for example you need "sudo apache -t" to check the syntax of a conf that references SSL certificates.

    In that case just prefix the command with the variables like this:
    sudo APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data apache2 -t

  3. #13
    Join Date
    Sep 2006
    Beans
    1

    Re: apache2: bad user name ${APACHE_RUN_USER}

    /etc/init.d/apache2 is great if you want to do any of the following:

    • start
    • stop
    • restart
    • reload
    • force-reload
    • start-htcacheclean
    • stop-htcacheclean
    • status


    But if you need to run apache2 with arguments (for example "apache2 -S" for checking your virtualhost settings) you could prefix the command like Fjan suggested above but I think it's easier to use the apache2ctl command like this:

    # apache2ctl -S

  4. #14
    Join Date
    Jun 2007
    Location
    Amsterdam
    Beans
    5

    Re: apache2: bad user name ${APACHE_RUN_USER}

    apache2ctl -S
    You are right, that is much more convenient than setting the environment vars by hand. Thanks.

  5. #15
    Join Date
    Dec 2006
    Beans
    3

    Re: apache2: bad user name ${APACHE_RUN_USER}

    Quote Originally Posted by adredz View Post
    hi i have a problem similar to the OP. but mine is:

    when i restart apache i get this:


    i think this has something to do with my server name, right? should i change it?how?
    i'm sorry this is my first time setting up a server..
    You need to define your ServerName in /etc/apache2/apache2.conf, e.g


    ServerName "www.myDomain.com"

  6. #16
    Join Date
    May 2008
    Beans
    2

    Smile Re: apache2: bad user name ${APACHE_RUN_USER}

    ServerName "www.myDomain.com"

    or

    ServerName localhost

    worked fine for me.

    thank to all

  7. #17
    Join Date
    Dec 2007
    Location
    Austin, Texas USA
    Beans
    260
    Distro
    Ubuntu

    Re: apache2: bad user name ${APACHE_RUN_USER}

    Also just for the record and in case some one else has the same problem as I did with ${APACHE_RUN_USER} error:

    I installed Plone and then it required for me to have sec. certs.
    I could not run apache2 -k start no matter what. So I went in the /etc/apache2/sites-enabled and removed that plone.conf (Or any other conf file that generates the error) Remember renaming the conf file in that directory will Not help as long as it's in there it will be read.

    I moved the bad.conf file to my home directory and apache started to run again?!

    The running of apache from /etc/init.d plus --force-reload switched helped me to figure out which file was responsible.
    So thanks to all who helped.

  8. #18

    Re: apache2: bad user name ${APACHE_RUN_USER}

    Quote Originally Posted by AllanJP View Post
    Hey that helped, I wonder why that helped, and not when I: cd /etc/init.d/ and then typed: apache2 restart ?,
    Probably because you should have done "./apache2 restart" instead of "apache2 restart", as well as sudo as others have pointed out. Without the "./", the computer uses the environment variables to look for an executable by that name. If you use "./", the directory you are currently browsing is used to look for that executable.

  9. #19
    Join Date
    Oct 2009
    Location
    Tripoli, Libya
    Beans
    12
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: apache2: bad user name ${APACHE_RUN_USER}

    I was trying to figure if mod_rewrite is loaded, when I run:
    Code:
    sudo apache2 -M
    I get the same error:
    apache2: bad user name ${APACHE_RUN_USER}
    tried restarting apache:
    Code:
    sudo /etc/init.d/apache2 restart
    but still the same, but using:
    Code:
    apache2ctl -M
    I got it to work!
    I'll check later for solution, thought it may help someone.

  10. #20
    Join Date
    Jul 2010
    Beans
    1

    Re: apache2: bad user name ${APACHE_RUN_USER}

    hello ,

    when i connect to htt://localhost/ or http://127.0.0.1/ (with original config file) ,it doesn't works !
    because "bad user name ${APACHE_RUN_USER}" ,you know that !

    After :




Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •