Archive for the ‘Apache’ Category

Internal error: pcfg_openfile() called with NULL filename

Friday, February 26th, 2010

Yeah, so even if you turn off basic authentication and specify a different auth method, Apache (at least some versions of it) still looks around for an auth file and throws a “pcfg_openfile() called with NULL” error when it can’t find one.  To fix, set the user auth file to /dev/null:

AuthBasicAurhorative off
AuthUserFile /dev/null

Or you can just ignore the errror I suppose. It looks more serious than it is.

The Apache service reported the following error:
>>> Unable to open logs .

Wednesday, October 14th, 2009

I hear what you’re saying… “What the..? Nothing changed!”

Ah, but are you running Skype? If so, turn it off and try again.

Skype grabs port 80 unless that port is otherwise occupied. Launch Apache first, or choose an alternative HTTP port.

Would be nice if the error message was something a little more clear. How about “Cannot acquire port 80″? But, nah.. that would ruin all the fun.

apache2: apr_sockaddr_info_get() failed for somehost

Thursday, August 7th, 2008

Hypothetically speaking of course, let’s assume you forget to renew a domain name. And suddenly that domain’s email is not working. And then you notice the site is down. The next step is, logically speaking, to panic, followed by an attempt to figure out what the hell is going on. Which usually means restarting Apache. Which results in:

apache2: apr_sockaddr_info_get() failed for yourhost

Which is, wow, an exotic new error. If you see this it means that, even though Apache says its restarting, really its probably not. And now all your other sites are down. And, so, more panic. More panic for you.

Now that you’ve probably realized that the default domain name has expired, you will want to get Apache back up on a different, actually non-expired domain. Like this:

$ hostname actual-non-expired-domain-name.com

Now restart.

Alternatively if your hostname is set to something like “www”, probably you can change the default site in vhosts so that Apache can connect the hostname to the tld.

This is all hypothetical of course.

Alternative authentication methods with Apache 2.2

Sunday, January 27th, 2008

Quick note on how to make alternative authentication modules work with Apache 2.2.

mod_auth_imap kept complaining about a missing password file:

(9)Bad file descriptor: Could not open password file: (null)

Turns out with Apache 2.2 you have to explicitly turn off Basic authentication even when you are using an alternative module. So a proper Apache 2.2 mod_auth_imap configuration would look something like this:

Auth_IMAP_Enabled On
AuthBasicAuthoritative Off
AuthType Basic
Require valid-user
Auth_IMAP_Authoritative On
Auth_IMAP_Server mail.server.com
Auth_IMAP_Port 143
Auth_IMAP_Log On

Turning off AuthBasicAuthoritative forces Apache to ignore the standard password file authentication.