LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-27-2013, 07:13 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Rep: Reputation: Disabled
apache error - folder not found


I am receiving this error:

Code:
apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Include directory '/var/www/mods-enabled' not found
Action 'configtest' failed.
The Apache error log may have more information.
 failed!
I am almost certain that I didn't touch this file/folder. And for some odd reason, my apache server is still up and running, even though it gives a error at boot-up, as well as when attempting to restart the service.

I went to the directory, and can confirm that this folder is not there. Not sure that it ever was. I was able to located it in /etc/apache2. Should I modify the file to represent this, or is there something else going on, causing the issue?
 
Old 04-28-2013, 03:44 AM   #2
Tralce
Member
 
Registered: Nov 2006
Location: Maine
Distribution: Debian, Ubuntu, Gentoo
Posts: 109

Rep: Reputation: 15
Apache2 uses this directory to determine which extensions, or "mods," are enabled. Descriptive title! Usually this directory contains a bunch of symbolic links pointing to corresponding items in the mods-available directory. To enable a mod, symlink it from mods-available to mods-enabled. If that directory is missing, no mods will be enabled. You need these links in place, for example, if you're going to use PHP. Here's mine:
Code:
root@caroline:~$ ls -l /etc/apache2/mods-enabled/
total 0
lrwxrwxrwx 1 root root 28 Apr 13 23:34 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 Apr 13 23:34 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 Apr 13 23:34 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 Apr 13 23:34 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 36 Apr 13 23:34 authz_default.load -> ../mods-available/authz_default.load
lrwxrwxrwx 1 root root 38 Apr 13 23:34 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 Apr 13 23:34 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 Apr 13 23:34 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 30 Apr 13 23:34 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 Apr 13 23:34 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root 26 Apr 13 23:34 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 Apr 13 23:34 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 Apr 13 23:34 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 27 Apr 13 23:34 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 Apr 13 23:34 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 34 Apr 13 23:34 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 Apr 13 23:34 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 27 Apr 13 23:34 perl.load -> ../mods-available/perl.load
lrwxrwxrwx 1 root root 27 Apr 13 23:34 php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root 27 Apr 13 23:34 php5.load -> ../mods-available/php5.load
lrwxrwxrwx 1 root root 29 Apr 13 23:34 python.load -> ../mods-available/python.load
lrwxrwxrwx 1 root root 33 Apr 13 23:34 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root 33 Apr 13 23:34 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root 31 Apr 13 23:34 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 Apr 13 23:34 setenvif.load -> ../mods-available/setenvif.load
So, yes, you really should have this dir in place and set up correctly.
 
Old 04-30-2013, 02:59 PM   #3
avg
LQ Newbie
 
Registered: Apr 2013
Location: Seattle WA
Posts: 2

Rep: Reputation: Disabled
I am getting the same error when I try to restart apache. This error started appearing when I restarted the server. I'm not sure what the problem is. Why is apache looking for /mods-enabled in /var/www? Shouldn't it look for that directory in /etc/apache2?
 
Old 04-30-2013, 03:20 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by avg View Post
I am getting the same error when I try to restart apache. This error started appearing when I restarted the server. I'm not sure what the problem is. Why is apache looking for /mods-enabled in /var/www? Shouldn't it look for that directory in /etc/apache2?
Perhaps you have a wrong ServerRoot in apache2.conf. Change it to
Code:
ServerRoot  /etc/apache2
and see if ti works

Regards
 
Old 04-30-2013, 06:19 PM   #5
avg
LQ Newbie
 
Registered: Apr 2013
Location: Seattle WA
Posts: 2

Rep: Reputation: Disabled
I got it! My ServerRoot is set to /var/www, so apache looks in /var/www for everything. When it tries to include mods-enabled, it looks in /var/www as well. I specified the full path in apache2.conf to look in /etc/apache2 and that fixed the problem.

Code:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

Include /etc/apache2/ports.conf

Include /etc/apache2/conf.d/

Include /etc/apache2/sites-enabled/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache:mod_ssl:Error: Private key not found. nemotech Linux - Newbie 0 12-21-2009 01:12 PM
file not found error when using folder names with 2 words sirius57 SUSE / openSUSE 4 08-02-2007 11:07 AM
Apache error: 404 Not Found, why? cucolin@ Ubuntu 3 08-14-2006 11:01 AM
Forbidden error with Apache when accessing mounted folder. maneeshsethi Linux - Newbie 2 12-22-2004 12:48 AM
Apache: Document Not Found error voyciz Linux - Software 3 06-17-2004 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration