texasmath ([personal profile] texasmath) wrote in [site community profile] dw_dev2010-09-18 09:45 pm
Entry tags:

Dreamwidth Install with Virtual Hosts?

A bit of background - I run a website serving a small but dedicated education community. I was running Ubuntu 8.04 and was successfully running a webserver hosting the website, phpbb forum, wiki, and a livejournal (using apache-perl on a different port) client for our group. My computer crashed during a bad rainstorm, and I took this opportunity to upgrade to Ubuntu 10.04. I've been able to restore the website, wiki, and phpbb forum, but wanted to get dreamwidth on, so I wouldn't have to use a different port.

Using the Scratch Installation, I can get dreamwidth exclusively to run correctly by using the "stage" file, but I lose all my other services (wiki/forum/other web pages.)

When I try to implement these commands in my virtual host, I run into a lot of issues.

My Virtual host block looks like this:

<VirtualHost *>
    ServerName example.org
    DocumentRoot /var/www/example.org/
    ServerAdmin webmaster@example.org
    ErrorLog /var/log/apache2/example.org_log
    CustomLog /var/log/apache2/example.org_log common
</VirtualHost>

<VirtualHost *>
    ServerName www.example.org
    DocumentRoot /var/www/example.org
    ServerAdmin webmaster@example.org
    ErrorLog /var/log/apache2/example.org_log
    CustomLog /var/log/apache2/example.org_log common
</VirtualHost>

<VirtualHost *>
    ServerName wiki.example.org
    DocumentRoot /var/www/example.org/wiki
    ServerAdmin webmaster@example.org
    ErrorLog /var/log/apache2/example.org_log
    CustomLog /var/log/apache2/example.org_log common
    Redirect permanent / http://www.example.org/wiki
</VirtualHost>

<VirtualHost *>
    ServerName forum.example.org
    Redirect permanent / http://www.example.org/forum/
    DocumentRoot /var/www/example.org/forum/
    ServerAdmin webmaster@example.org
    ErrorLog /var/log/apache2/example.org_log
    CustomLog /var/log/apache2/example.org_log common
</VirtualHost>

<VirtualHost *>
    PerlOptions +Clone
    ServerName journal.example.org
    DocumentRoot /home/dw/htdocs
    ServerAdmin webmaster@example.org
    ErrorLog /var/log/apache2/example.org_log
    CustomLog /var/log/apache2/example.org_log common
    PerlSetEnv LJHOME /home/dw
    SetEnv LJHOME /home/dw
    PerlPassEnv LJHOME
    SetHandler perl-script
#    PerlConfigRequire /home/dw/cgi-bin/modperl.pl
</VirtualHost>


This allow my webserver to serve all the pages, but doesn't render the bml correctly. When I uncomment the PerlConfigureRequire, I get the following error:


* Restarting web server apache2 Use of uninitialized value $LJ::HOME in concatenation (.) or string at /home/dw/cgi-bin/LJ/LJ/Config.pm line 74.
Use of uninitialized value $LJ::HOME in concatenation (.) or string at /home/dw/cgi-bin/LJ/LJ/Config.pm line 74.
Use of uninitialized value $LJ::HOME in concatenation (.) or string at /home/dw/cgi-bin/LJ/LJ/Config.pm line 74.
Use of uninitialized value $LJ::HOME in concatenation (.) or string at /home/dw/cgi-bin/LJ/LJ/Config.pm line 74.
Syntax error on line 92 of /etc/apache2/sites-enabled/000-default:
Base class package "CSS::Cleaner" is empty.\n (Perhaps you need to 'use' the module which defines that package first,\n or make that module available in @INC (@INC contains: /src/s2 /home/dw/cgi-bin/LJ /home/dw/cgi-bin /cgi-bin /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /etc/apache2).\n at /home/dw/cgi-bin/LJ/CSS/Cleaner.pm line 20\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/LJ/CSS/Cleaner.pm line 20.\nCompilation failed in require at /home/dw/cgi-bin/HTMLCleaner.pm line 8.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/HTMLCleaner.pm line 8.\nCompilation failed in require at /home/dw/cgi-bin/LJ/S2.pm line 26.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/LJ/S2.pm line 26.\nCompilation failed in require at /home/dw/cgi-bin/LJ/LJ/S2.pm line 22.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/LJ/LJ/S2.pm line 22.\nCompilation failed in require at /home/dw/cgi-bin/Apache/LiveJournal.pm line 26.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/Apache/LiveJournal.pm line 26.\nCompilation failed in require at /home/dw/cgi-bin/modperl_subs.pl line 31.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/modperl_subs.pl line 31.\nCompilation failed in require at /home/dw/cgi-bin/modperl.pl line 49.\nCompilation failed in require at (eval 2) line 1.\n
[fail]




For the record, /home/dw/cgi-bin/CSS/Cleaner.pm exists, and is the same as this.

I know that virtual hosts are "discouraged" because the dreamwidth code can be memory and processor intensive, but this same system was able to handle 20-30 user accounts for our group.

Can anyone give me a clue how to tweak my virtual host to render the bml correctly?

I appreciate all the help you can offer!

TDP.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2010-09-21 03:42 pm (UTC)(link)
Hmm, oh right, try running those commands from:

$LJHOME/cvs/dw-free


rather than from $LJHOME.


Also, I think that might mean that it's not loading the s2 libraries in properly? What values do you get from DW->home? What values are set for $LJ::HOME, and $ENV{LJHOME}? Are all of them correct/as you'd expect?

(Wrong account!)