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:
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:
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.
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.
no subject
I will say, though, that if you want a backup of your LJ, I would recommend that you not have it on the Dreamhack machine itself; there are no guarantees about data on that machine due to its nature. Instead, I'd suggest settuping up a new account at Dreamwidth itself and importing the journal if you don't want to do it on your current account. :)
Take care. :D
no subject
The biggest issue seems to be the scope of cgi-bin/S2 and cgi-bin/LJ/S2. I've tried to tweak these as they've come up and now am at:
Bareword "S2::PROPS" not allowed while "strict subs" in use at /home/dw/cgi-bin/LJ/S2/EntryPage.pm line 175.\nCompilation failed in require at /home/dw/cgi-bin/S2.pm line 36.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/S2.pm line 36.\nCompilation failed in require at /home/dw/cgi-bin/LJ/S2.pm line 22.\nBEGIN failed--compilation aborted at /home/dw/cgi-bin/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]
At this I'm at a loss.
TDP.
no subject
use DW;
use lib DW->home . "/src/s2";
use S2;
b.) that doesn't match up to the line numbers on my file; can you see what version of the code you are on right now?
hg id
If you're on an older version, that may be some of the problems we've seen.
no subject
For some strange reason I'm getting "abort: There is no Mercurial repository here (.hg not found)!
"
no subject
And the line using S2::PROPS :
I do appreciate all the help!
TDP.
no subject
$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!)
no subject
dw@draal:~/cvs/dw-free$ hg id
b742d4633e8c tip
Not sure how to get the other information you need. I'm not very fluent in Perl.
Thanks for all your help!