Can't open /etc/apache2/envvars
Running your web server on Ubuntu is a quick easy way to get yourself up and running. With a lamp install (Linux, APACHE, MySql, and PHP) you can be up and running in under and hour on very limited hardware. That is all fine and good until you go about messing with your httpd.conf files while testing a new help desk ticket software. [Helpdesk software]
After testing some different helpdesk software on a machine i was using to host a small internal site, Nagios advises me that it is not refusing http connections. Easy i thought, so i drop down to a command shell and restart Apache.
“Can’t open /etc/apache2/envvars”
Just great. So after a ton of searching i found a lot of people with this issue and a guy that had solved the problem here.
Its actually not to bad.
First you need to drop all Apaches packages.
sudo dpkg -–get-selections | grep apache
sudo apt-get remove -–purge apache2 apache2-mpm-worker apache2-threaded-dev apache2-utils apache2.2-common libapache2-mod-python libapache2-mod-python-doc libapache2-mod-wsgi
Then you just need to reinstall
sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi libapache2-mod-python-doc
When its all said and done, you don’t even have to reboot. Don’t you just love Linux!
Many props to Samuel Huckins over at http://dancingpenguinsoflight.com/
November 11th, 2009 at 6:02 am
You forgot some dashes in the commands it should be:
“–get-selections” and “–purge”
Thanks for the tutorial. You saved me lots of grief.
November 11th, 2009 at 6:06 am
I guess you didnt forget the dashes as it cut off mine as well.
Put two dashes before “get-selections” and “purge”
November 11th, 2009 at 10:42 am
Thanks I fixed it now. Sometimes wordpress acts funny with those things.
Glad it helped!