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)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2010-03-20 07:00 pm (UTC)(link)
Hmm. You really don't want to be running DW on a webserver with other sites on it, I think; ideally a Dreamwidth installation should live on its own server, without using VirtualHosts. As such, it's very hard to know what precisely is going on. (Also, watch out for any weirdnesses on your other virtual hosts...)

That said, you could try the following:

* moving the Perl lines into the hamsterjournal.com VirtualHost section, rather than in the main section.
* Removing the DirectoryIndex line from the hamsterjournal.com VirtualHost; DW provides its own to Apache when it initialises.

All in all, those might bring some luck. But I have no clue how well the DW code will perform in a VirtualHost; particularly, as your configuration is currently set up, you won't be able to use user subdomains.

If you can, I'd advise you set up a totally new Apache instance with its own config and no VirtualHosts; you might have more luck with that.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2010-03-20 08:44 pm (UTC)(link)
Not to mention that the DW code is kind of a hog. I wouldn't want to run anything other than a dev site on 512MB of RAM, for instance....