2. Example httpd.conf

ServerType standalone
ServerRoot "/etc/apache-perl"
PidFile /var/run/apache-perl.pid
Timeout 30
KeepAlive Off

MinSpareServers 5
MaxSpareServers 40
StartServers 10
MaxClients 20
MaxRequestsPerChild 250

Port 80
User lj
Group lj

UseCanonicalName off
SendBufferSize 163840

ServerName   www.example.com
ServerAlias  example.com
PerlSetEnv   LJHOME /home/lj
PerlRequire  /home/lj/cgi-bin/modperl.pl


This will work by itself (assuming mod_perl statically linked), or you can just tack on parts to your existing config.

/home/lj is only an example directory. You'll want to use the same directory used in Section 1, “$LJHOME Environment Variable”.

If you wish, you can put those last four lines in a VirtualHost block.


You may find it helpful to use separate Apache logfiles for your LiveJournal installation. As before, you can place the relevant lines inside a VirtualHost block. Example:

ErrorLog     /var/log/apache-perl/ljerror.log
LogFormat    "%h %l %u %t \"%!414r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog    /var/log/apache-perl/ljaccess.log combined