I have installed apache2 in my ubuntu 12.4 using sudo apt-get install apache2
, now i am not able to start the server, when i use service apache2 start
, following things were displayed.
bharathkumar@hkbharath:~$ service apache2 start
* Starting web server apache2
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
mktemp: failed to create directory via template `/var/lock/apache2.XXXXXXXXXX': No such file or directory
chmod: missing operand after `755'
Try `chmod --help' for more information.
[fail]
i tried uninstalling and reinstalling apache2, but still getting the same thing, please help me to start my apache2 server.
Thanks
Best Answer
I had the same problem running on a virtual server. Turns out that /var/lock is a symbolic link to /run/lock, which didn't exist. I solved it like this:
sudo mkdir /run/lock
Then restart Apache:
sudo service apache2 restart
Hope it works for you.