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
The way I get it working on the Dreamhack machine is a bit hacky. I have Perlbal set up to handle each request, and it directs the request to the appropriate Apache, which are all listening on different ports on localhost. That way it *looks* like they're all part of the same server, but they're not. (It also allows people to stop and start their Apaches individually, which is very important for a 'hack.)
Talking of Dreamhacks, by the way, I received your application for one on the 6th and set it up two days later, but I notice you haven't logged into it - and given this post, I'm wondering if you received the welcome email?
no subject
Putting "/home/dw" as a string literal instead of $LJ:HOME on lines 74 and 91 in ljconfig.pm took care of the first four errors (I don't plan on moving the installation location) but still have the issue of CSS::Cleaner. Is there some CPAN package I'm supposed to install to have it work? I must confess I'm not that familiar with perl.
Thanks,
TDP.
no subject
I should say that $LJ::HOME and $ENV{LJHOME} are both used quite a lot in the code, I think, so I suspect that replacing them with their literal values isn't the way forward.
The CSS::Cleaner error is most likely related to this, because assuming that you've been using cvsreport.pl as described in the wiki, the CSS::Cleaner is actually placed inside $LJHOME itself - you'll see it at /home/dw/cgi-bin/CSS/Cleaner.pm . CSS::Cleaner is used by LJ::CSS::Cleaner.
The thing is, looking at the directories it's searching in, it's using /home/dw/cgi-bin/LJ before /home/dw/cgi-bin - which causes Perl to find the /home/dw/cgi-bin/LJ/CSS/Cleaner.pm file first, which of course is LJ::CSS::Cleaner again, not CSS::Cleaner. Because it doesn't find the right package, it complains that the package is empty. Somewhere there's probably a "use lib '/home/dw/cgi-bin/LJ';" line that shouldn't have that '/LJ' on the end. I can't see any lines like that in the original code (if there were, it'd probably not be working, but I checked anyway), so you may have to do some hunting yourself to see where that came from.
I must admit, I'm still really concerned about this Dreamhack email problem. I think I'll put a note on the application form to say that if you haven't heard anything from me in a few days, to email me and ask what's up. I can try setting your account up again if you want to try again. If that doesn't work, I can just email you the details manually, although if you're not getting email from it there may be other emails that you'd miss as well... hmm. :/
no subject
I'll have to take a look at the files in question. It may have been I tweaked one line to get past an error only to reach this. I'll post back later when I have a chance to play with it.
Again, thanks!
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!