Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here is my server modules list (modules.conf), its working without any problems, and lighttpd is running correctly while using this list:

server.modules = (
  "mod_access",
#  "mod_alias",
#  "mod_auth",
#  "mod_evasive",
#  "mod_redirect",
#  "mod_rewrite",
#  "mod_setenv",
#  "mod_usertrack",
)

The problem appears, when I want to uncomment the mod_rewrite module:

server.modules = (
  "mod_access",
#  "mod_alias",
#  "mod_auth",
#  "mod_evasive",
#  "mod_redirect",
   "mod_rewrite",
#  "mod_setenv",
#  "mod_usertrack",
)

Then I'm getting the following message, when I want to run my web server:

2012-05-01 15:01:18: (plugin.c.169) dlopen() failed for: /usr/local/lib/lighttpd/mod_indexfile, mod_access.so Cannot open "/usr/local/lib/lighttpd/mod_indexfile, mod_access.so"

2012-05-01 15:01:18: (server.c.656) loading plugins finally failed /usr/local/etc/rc.d/lighttpd: WARNING: failed to start lighttpd

As you can see, it does have some problems with the mod_access module, but its strange a little bit, especially when I comment back the mod_rewrite module then its working.

Where is the problem?

share|improve this question
    
Please don't cross-post. Can you provide your entire config? –  Shane Madden May 1 '12 at 16:50
    
@ShaneMadden Here, pastebin.com/raw.php?i=ze3LsifH. –  Cyclone May 1 '12 at 20:15

1 Answer 1

up vote 1 down vote accepted
$HTTP["host"] =~ "(^|\.)mywebsite\.com$" {
    server.modules += ( "mod_rewrite" )

That's the problem. Don't modify server.modules within a conditional block. See here.

share|improve this answer
    
Then what I have to do? And how comes this one server.modules += ( "mod_fastcgi" ) at the bottom is working correctly? –  Cyclone May 1 '12 at 20:35
    
Move it outside of the $HTTP["host"] block. The mod_fastcgi append works because it's not in a conditional block. –  Shane Madden May 1 '12 at 21:23
    
Oh, well.. I'd never though something like this may happend.. that really doesn't make any difference at all. But I'm happy its finally working. Thank you. –  Cyclone May 1 '12 at 21:28
    
@Cyclone Yeah, that's an absolutely unhelpful error message that it gives in this case. Glad it's working now! –  Shane Madden May 1 '12 at 21:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.