Obsolete Releases > SME 8.x Contribs
Wordpress Multisite
(1/1)
newburns:
I've recently upgraded my multisite to follow Calisun's User http://wiki.contribs.org/User_talk:Calisun Page instructions, but am coming up with errors once I
--- Code: ---expand-template /etc/httpd/conf/httpd.conf
--- End code ---
--- Code: --- ERROR in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent: Program fragment delivered error <<Can't locate object method "above" via package "the" (perhaps you forgot to load "the"?) at /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent line 69.>> at template line 1
WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts: ERROR: Template processing failed for //etc/httpd/conf/httpd.conf/VirtualHosts: 1 fragment generated errors
at /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts line 38
WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts: Use of uninitialized value in concatenation (.) or string at /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts line 38.
ERROR in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent: Program fragment delivered error <<Can't locate object method "above" via package "the" (perhaps you forgot to load "the"?) at /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent line 69.>> at template line 1
WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts: ERROR: Template processing failed for //etc/httpd/conf/httpd.conf/VirtualHosts: 1 fragment generated errors
at /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts line 38
WARNING in /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts: Use of uninitialized value in concatenation (.) or string at /etc/e-smith/templates//etc/httpd/conf/httpd.conf/80VirtualHosts line 38.
WARNING: Template processing succeeded for //etc/httpd/conf/httpd.conf: 4 fragments generated warnings
at /sbin/e-smith/expand-template line 45
--- End code ---
calisun:
Strange, works fine for me:
inside folder location:
--- Code: ---/etc/e-smith/template-custom/etc/httpd/conf/httpd.conf/VirtualHosts/
--- End code ---
Create a text file named:
--- Code: ---20IbayContent
--- End code ---
Contents of the text file:
--- Code: ---{
use esmith::AccountsDB;
my $accounts = esmith::AccountsDB->open_ro;
use esmith::DomainsDB;
my $domains = esmith::DomainsDB->open_ro;
$OUT = "";
my $ibay = $virtualHostContent;
my $basedir = "/home/e-smith/files/ibays/$ibay";
my $cgiBin = $accounts->get_prop($ibay, "CgiBin") || "";
$OUT .= " DocumentRoot $basedir/html\n";
if ($cgiBin)
{
$OUT .= " ScriptAlias /cgi-bin $basedir/cgi-bin\n";
}
else
{
$OUT .=
" # To add cgi-bin ScriptAlias for this i-bay, run:\n"
. " # /sbin/e-smith/db accounts setprop $ibay CgiBin "
. "enabled\n"
. " # /sbin/e-smith/signal-event console-save\n";
}
$OUT .= "# Alias /files $basedir/files\n";
if (($domains->get_prop($virtualHost, 'SystemPrimaryDomain') || 'no')
eq 'yes')
{
my @ibays = $accounts->ibays;
foreach my $ibay (@ibays)
{
my $key = $ibay->key;
next if $key eq $virtualHostContent;
my $basedir = "/home/e-smith/files/ibays/$key";
my $cgiBin = $ibay->prop("CgiBin") || "";
my $name = $ibay->prop("Name") || "";
$OUT .= "\n";
$OUT .= " # $key ibay ($name)\n";
$OUT .= "\n";
if ($cgiBin)
{
$OUT .= " ScriptAlias /$key/cgi-bin $basedir/cgi-bin\n";
}
else
{
$OUT .=
" # To add cgi-bin ScriptAlias for this i-bay, run:\n"
. " # /sbin/e-smith/db accounts setprop $key CgiBin "
. "enabled\n"
. " # /sbin/e-smith/signal-event console-save\n";
}
$OUT .= " Alias /$key/files $basedir/files\n";
# Make sure this one is last since it's a prefix of the above
# aliases. If we put it first, it would get expanded before the
# other aliases, creating problems.
$OUT .= " Alias /$key $basedir/html\n";
}
$OUT .= " # No ibays in system\n" unless @ibays;
}
}
--- End code ---
To activate the custom template:
--- Code: ---signal-event post-upgrade; signal-event reboot
--- End code ---
newburns:
Does it really require a reboot or will expanding the httpd.conf work?
This is a production server and reboots require scheduling with the company employees
calisun:
oops, my bad, I had a typo, the folder location actually needs to be:
--- Code: ---/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/
--- End code ---
afaik, expanding the httpd.conf should work
.
janet:
calisun & newburns
--- Quote ---afaik, expanding the httpd.conf should work
--- End quote ---
...and restart httpd-e-smith
ie
expand-template /etc/httpd/conf/httpd.conf
svc -h /service/httpd-e-smith
Navigation
[0] Message Index
Go to full version