Apache ENVVARS not loading

6,504

you may have to do:

apache2ctl stop && apache2ctl start

or

/etc/init.d/apache2 stop && /etc/init.d/apache2 start

as only "restart" doesn't seem to load the envvars file that is generated from envvars-std.in.

Share:
6,504

Related videos on Youtube

ashraj98
Author by

ashraj98

Updated on September 18, 2022

Comments

  • ashraj98
    ashraj98 over 1 year

    My problem originated from my website not loading on a almost-fresh install of Debian and an ISPConfig server, Apache and MariaDB only. It would resolve, but not loaded after site loaded once completely. Running apache2ctl status indicated returned that many of the Apache workers were stuck in "L" or logging state. I emptied all the logs, but to no avail. Randomly, I just ran apache2 on the terminal and saw a bunch of warnings indicating that none of the variables specified in /etc/apache2/envvars were set.

    I generally use service apache2 restart to restart Apache. After searching the web, I found that sometimes one command may not load the envvars file. So I tried restarting with: service apache2 restart apache2ctl restart /etc/init.d/apache2 restart

    None of these load the envvars. Sourcing the file (source /etc/apache2/envvars), makes it work, but only for a while, and then it stops working for a reason I can't determine. Checking the restart script, it seems envvars are accounted for.

    Ideally I would not have to aplly the temporary fix by sourcing the file every time. Why is it not automatically running?

  • Castaglia
    Castaglia about 8 years
    Since this is more of a "me, too!" it belongs more as a comment than as an answer/solution to the OP's posting.
  • Íhor Mé
    Íhor Mé almost 4 years
    Obviously, this doesn't work. (Yes, tested)