naienko: (Default)
naienko ([personal profile] naienko) wrote in [site community profile] dw_dev2010-03-19 07:21 pm
Entry tags:

mod_perl brains

I'm so close I can smell it. Apache directives are set, db is populated, files are in the right folders ...

*insert swearing here* So everything else works - I'm just getting a DirectoryIndex instead of it loading index.bml properly. When I load index.bml directly it shows the code. There's gotta be something I'm missing here, something key.

site throws 500 internal error, error.log says:

/home/crantz3/.htaccess: Can't locate modperl_subs.pl in @INC (@INC contains: CODE(0x10e3870) /cgi-bin /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /dh/apache2/apache2-ps23029) at /home/crantz3/dw/cgi-bin/modperl.pl line 60.
Compilation failed in require at (eval 2) line 1.

Now, I know the LJHOME variable is set, I've run
env
. I know modperl_subs.pl exists, I'm looking at it. I know it's in the cgi-bin.

I've even gone in and force-set the location of modperl_subs.pl, at which point it says fine, Can't locate LJ/Config.pm in @INC etcetc.

What's set wrong here?


It's taunting me.

/home/crantz3/.htaccess: Can't run '$s->add_config' after server startup at /home/crantz3/dw/cgi-bin/modperl_subs.pl line 205.

/facepalm
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2010-03-20 06:48 pm (UTC)(link)
You need to have:

PerlSetEnv LJHOME /home/[username]/dw
SetEnv LJHOME /home/[username]/dw
PerlPassEnv LJHOME

PerlRequire /home/[username]/dw/cgi-bin/modperl.pl

down in the <VirtualHost 69.163.149.178:80> section
However note that the Dreamwidth code isn't known to play well with VirtualHost directives -- SHOULD be fine if it's the only mod_perl site, though.

Also, you are missing the apreq module.

If you still, can't get it working, try a config file closer to:
http://pastie.org/private/euszmiymtz57x7fbz4liq
Edited (Escaping is my friend) 2010-03-20 18:54 (UTC)