apache2 error Could not open configuration file /etc/apache2/conf.d/: No such file or directory

I have just upgraded my Ubuntu 13.10 and apache2 is not working. When I try to start the apache2 server it is printing following errors:

 * Starting web server apache2
 * The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 263 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Action 'configtest' failed.

Solution 1:

It was the same for me. After I created the conf.d folder still Apache 2 won't start. I was able to solve like this:

Replacing this line

LockFile ${APACHE_LOCK_DIR}/accept.lock

with this one

Mutex file:${APACHE_LOCK_DIR} default

in /etc/apache2/apache2.conf solved the problem.

(source)

Solution 2:

When creating symbolic links make sure to use absolute paths

Instead of:

ln -s ./conf-available/mysite.conf ./conf-enabled/mysite.conf

You should use :

ln -s /etc/apache2/conf-available/mysite.conf /etc/apache2/conf-enabled/mysite.conf