Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: EdelingF on May 21, 2008, 09:44:07 PM
-
I added an extra domain to my server and followed the http://wiki.contribs.org/Web_Application_Redirect_Tutorial (http://wiki.contribs.org/Web_Application_Redirect_Tutorial) to redirect this virtual domail to an Joomla installation in opt/
I did something wrong I know of; I typed config setprop joomla domain www.myvirtualdomain.com
litteral and accidently pushed enter while I should have changed it into config setprop joomla domain www.realvirtualdomain.com
.
I did this after making the mistake and after this I completed the rest of the commands.
The redirect works great but…..after doing this I can't find the server-manager.
I did signal-event post-upgrade
and signal-event reboot
, but no result.
If I type the local IP of the server I end up at Joomla
Should I try something like removing /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
?
-
You have messed up I guess as the rewrite is redirecting everything to your joomla base dir instead, here it will not find a share called server-manager. I guess your best bet is to revert changes you made.
If I type the local IP of the server I end up at Joomla
And what happens when you try and access https://ip-number/server-manager ?
-
The same: The requested URL /server-manager/ was not found on this server.
Should I try something like removing
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
followed by
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
?
-
The same: The requested URL /server-manager/ was not found on this server.
Should I try something like removing
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
followed by
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
?
Are you sure the webserver is restarted? My guess it isn't. What is the output of the following (does it say a large number of seconds or just a few):
sv h /service/httpd-e-smith
sv h /service/httpd-e-smith
If it does not output something like this (the number of seconds should be really low, in the order of seconds or less):
run: httpd-e-smith: (pid 32497) 1s, normally down
[root@sme73test ~]#
try this:
sv t /service/httpd-e-smith
sv s /service/httpd-e-smith
That should output something like this (the number of seconds should be really low, in the order of seconds or less):
run: httpd-e-smith: (pid 32497) 1s, normally down
[root@sme73test ~]#
If the number of seconds is in the order of seconds your webserver has restarted. Now see if you can access the server-manager.
-
Cactus,
I did what you suggested:
Are you sure the webserver is restarted? My guess it isn't. What is the output of the following (does it say a large number of seconds or just a few):
sv h /service/httpd-e-smith
sv h /service/httpd-e-smith
If it does not output something like this (the number of seconds should be really low, in the order of seconds or less):
No result
sv t /service/httpd-e-smith
sv s /service/httpd-e-smith
The result was:
run: /service/httpd-e-smith: (pid 9613) 4s, normally down
But I still can't access the server-manager.....
-
I suggest you revert your changes, as you are using a highly experimental and a very bad method to create your domain for joomla.
The correct way would be to create a directory for a VirtualHost in the templates-custom tree, with all proper templates you need in there... but you will need to know something about SME Server and its architecture.
Do you really need joomla at that location or would a redirect to joomla from the Primary ibay do as well?
-
Cactus, can you tell me how to undo it? Just by removing the template?
I'm not that good with creating templates, so I'll have to find an way to redirect. I'll probably asign the domain to an Ibay or something like that.
I offered my sportsclub to host their domain and website since my server is running anyway for my own domain; I thought it would be a simple thing to do.....
-
Cactus, can you tell me how to undo it? Just by removing the template?
I'm not that good with creating templates, so I'll have to find an way to redirect. I'll probably asign the domain to an Ibay or something like that.
I offered my sportsclub to host their domain and website since my server is running anyway for my own domain; I thought it would be a simple thing to do.....
please post here the result of
grep -i joomla /var/log/messages
Ciao
Stefano
-
Stefano,
That gives no result, no output whatsoever
-
Cactus, can you tell me how to undo it? Just by removing the template?
Yes, after that regenerate the configuration file and restart the webserver like this:
expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith
I'm not that good with creating templates, so I'll have to find an way to redirect. I'll probably asign the domain to an Ibay or something like that.
You could do so, as this is the intended way... but if you need more control you can use the path described below, which is a far better method than the one suggested in the wiki.
I offered my sportsclub to host their domain and website since my server is running anyway for my own domain; I thought it would be a simple thing to do.....
It is if you know how. In short the proper way is to create subdirectory for the domain you desire in the templates-custom tree at the same level of the VirtualHosts folder:
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/www.realvirtualdomain.com
Copy at least the following files from /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/ into the new folder:
- 00Setup
- 02ServerName
- 25SSLDirectives
- 26RewriteTraceAndTrack
- 50DirectoryIndex00
- 50DirectoryIndex00PHP
- 85DefaultAccess
- template-begin
- template-end
The only thing we need to do now is to copy the content of the joomla configuration directives in there, but I do not have them handy...
After that you should be able to regenerate your configuration file
expand-template /etc/httpd/conf/httpd.conf
Test the configuration file
httpd -t
If it says the syntax is OK you can restart your webserver
sv t httpd-e-smith
-
please post here the result of
grep -i joomla /var/log/messages
That file is of not much use, he is better of looking in /var/log/httpd/error_log and /var/log/httpd/access_log and perhaps /var/log/httpd/admin_error_log and /var/log/httpd/admin_access_log as well.
-
Thanks Cactus, I'll will look in to this next weekend and trie to think things over twice before doing.
I don't want to break things up again....
-
Thanks Cactus, I'll will look in to this next weekend and trie to think things over twice before doing.
I don't want to break things up again....
If you do things properly you can easily revert changes and restore your system to work correctly...
-
the joomla configuration directives, would this be something like the contents of a template called 92joomla ?
-
YES! I can get into the server-manager again.
Will do the rest later
-
the joomla configuration directives, would this be something like the contents of a template called 92joomla ?
Yep, but I guess they need to be slightly modified, can you paste the content of that file for me?
-
YES! I can get into the server-manager again.
Will do the rest later
I knew you would... good luck with the rest!
-
Cactus,
Ik took me a while to copy/paste the text from the 92joomla template, but here it is:
{
$OUT = "";
my $allow = 'all';
my $pass = '0';
my $satisfy = 'all';
my $name = $joomla{'Name'} || 'Joomla CMS';
for ('exit-if-none')
{
if ($joomla{'PublicAccess'})
{
if ($joomla{'PublicAccess'} eq 'none')
{
next;
}
elsif ($joomla{'PublicAccess'} eq 'local')
{
$allow = $localAccess;
$pass = 0;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'local-pw')
{
$allow = $localAccess;
$pass = 1;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global')
{
$allow = 'all';
$pass = 0;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global-pw')
{
$allow = 'all';
$pass = 1;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global-pw-remote')
{
$allow = $localAccess;
$pass = 1;
$satisfy = 'any';
}
}
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "# joomla - $joomla{'Name'}\n";
$OUT .= "#------------------------------------------------------------\n";
{
if ((exists $joomla{'URL'}) && ($joomla{'URL'} ne ''))
{ $OUT .= "Alias /$joomla{'URL'} /opt/joomla\n"; }
}
$OUT .= "Alias /joomla /opt/joomla\n";
$OUT .= "\n";
$OUT .= "<Directory /opt/joomla>\n";
$OUT .= " order deny,allow\n";
$OUT .= " deny from all\n";
$OUT .= " allow from $allow\n";
if ($pass)
{
$OUT .= " AuthName \"$joomla{'Name'}\"\n";
$OUT .= " AuthType Basic\n";
$OUT .= " AuthExternal pwauth\n";
$OUT .= " require valid-user\n";
$OUT .= " Satisfy $satisfy\n";
}
$OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n";
$OUT .= " php_admin_value open_basedir /opt/joomla:/tmp\n";
$OUT .= " php_admin_value display_errors 1\n";
$OUT .= "</Directory>\n";
}
}
I hope this is the one we're looking for.
It's located in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/
-
But a quick qestion if I may, not regarding joomla, but I installed user-manager and well, same thing happend.
Any way to restore the server-manager at all? :-)
-
But a quick qestion if I may, not regarding joomla, but I installed user-manager and well, same thing happend.
Any way to restore the server-manager at all? :-)
First of all it is not very nice to hijack a topic of others, you should at least have taken th effort to create a new thread with the proper subject. Furthermore I have to direct you to the bug tracker as this is non standard behavior for a contrib, you should report your issue there and be as precise as possible in stating what you did and what you see. Saying that the same happens is not really helpful to any of us, post relevant results from the error logs or error messages you see, so people who know ho to judge the information get the possibility to do so, in order to help you out.
-
Cactus,
Trying to read the Joomla template, I don't see any lines I think should be changed.
If I try this, is there a risk a break up my server?
-
Cactus,
Trying to read the Joomla template, I don't see any lines I think should be changed.
If I try this, is there a risk a break up my server?
Not sure, but you can try it like this. After that regenerate the configuration file:
expand-template /etc/httpd/conf/httpd.conf
Test the ne configuration:
httpd -t
If OK restart your webserver:
sv t httpd-e-smith
If it is not OK, post the error here or try to resolve it.
If you run in to troubles you can easily remove the directory I told you to create in an earlier post (or remove the template fragment(s)) in it, regenerate the configuration file and restart your webserver (with commands listed above).
-
Cactus,
I did what you told me and all went ok (I did not break up my server), but the virtual domain still end in the Ibay.
Do I simply remove the Ibay now or should there be some changes in one of the files?
00Setup
{
use esmith::DomainsDB;
# Convert the passed hash for the domain object back into an object.
$domain = bless \%domain, 'esmith::DB::db::Record';
# Make scalars from some of the properties of the domain
$virtualHost = $domain->key;
$virtualHostContent = $domain->prop('Content');
$OUT = "";
}
02ServerName
ServerName {$virtualHost}
25SSLDirectives
{
return " # skipping SSL directives\n" unless $port eq "443";
return "" unless $modSSL{'status'} eq 'enabled';
$OUT = <<SSL_END;
# SSL Directives
SSLEngine on
SSL_END
}
26RewriteTraceAndTrack
{
$OUT =<<'HERE';
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
HERE
}
50DirectoryIndex00
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
DirectoryIndex index.htm index.html index.shtml index.cgi
50DirectoryIndex00PHP
{
return "" unless (defined $php{'status'} and $php{'status'} eq 'enabled');
my @directives = qw(
index.htm index.html index.shtml index.cgi
index.php index.php3 index.phtml
);
$OUT = "DirectoryIndex @directives\n";
}
85DefaultAccess
# First, we configure the "default" to be a very restrictive set of
# permissions.
<Directory />
Options None
AllowOverride None
order deny,allow
deny from all
allow from none
</Directory>
92joomla
{
$OUT = "";
my $allow = 'all';
my $pass = '0';
my $satisfy = 'all';
my $name = $joomla{'Name'} || 'Joomla CMS';
for ('exit-if-none')
{
if ($joomla{'PublicAccess'})
{
if ($joomla{'PublicAccess'} eq 'none')
{
next;
}
elsif ($joomla{'PublicAccess'} eq 'local')
{
$allow = $localAccess;
$pass = 0;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'local-pw')
{
$allow = $localAccess;
$pass = 1;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global')
{
$allow = 'all';
$pass = 0;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global-pw')
{
$allow = 'all';
$pass = 1;
$satisfy = 'all';
}
elsif ($joomla{'PublicAccess'} eq 'global-pw-remote')
{
$allow = $localAccess;
$pass = 1;
$satisfy = 'any';
}
}
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "# joomla - $joomla{'Name'}\n";
$OUT .= "#------------------------------------------------------------\n";
{
if ((exists $joomla{'URL'}) && ($joomla{'URL'} ne ''))
{ $OUT .= "Alias /$joomla{'URL'} /opt/joomla\n"; }
}
$OUT .= "Alias /joomla /opt/joomla\n";
$OUT .= "\n";
$OUT .= "<Directory /opt/joomla>\n";
$OUT .= " order deny,allow\n";
$OUT .= " deny from all\n";
$OUT .= " allow from $allow\n";
if ($pass)
{
$OUT .= " AuthName \"$joomla{'Name'}\"\n";
$OUT .= " AuthType Basic\n";
$OUT .= " AuthExternal pwauth\n";
$OUT .= " require valid-user\n";
$OUT .= " Satisfy $satisfy\n";
}
$OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n";
$OUT .= " php_admin_value open_basedir /opt/joomla:/tmp\n";
$OUT .= " php_admin_value display_errors 1\n";
$OUT .= "</Directory>\n";
}
}
template-begin
<VirtualHost {$ipAddress}:{$port}>
template-end
</VirtualHost>
I can't really find a line that redirects to /opt/joomla, so I think that's the problem?