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

Title: server-manager was not found
Post 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
Code: [Select]
config setprop joomla domain www.myvirtualdomain.com litteral and accidently pushed enter while I should have changed it into
Code: [Select]
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
Code: [Select]
signal-event post-upgrade and
Code: [Select]
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
Code: [Select]
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla?
Title: Re: server-manager was not found
Post by: cactus on May 21, 2008, 09:49:03 PM
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 ?

Title: Re: server-manager was not found
Post by: EdelingF on May 21, 2008, 09:54:41 PM
The same: The requested URL /server-manager/ was not found on this server.

Should I try something like removing
Code: [Select]
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomlafollowed by
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
?


Title: Re: server-manager was not found
Post by: cactus on May 21, 2008, 10:52:36 PM
The same: The requested URL /server-manager/ was not found on this server.

Should I try something like removing
Code: [Select]
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomlafollowed by
Code: [Select]
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):
Code: [Select]
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):
Code: [Select]
run: httpd-e-smith: (pid 32497) 1s, normally down
[root@sme73test ~]#

try this:
Code: [Select]
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):
Code: [Select]
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.
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 08:27:57 PM
Cactus,

I did what you suggested:

Quote
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):

Code: [Select]
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

Quote
Code: [Select]
sv t /service/httpd-e-smith
sv s /service/httpd-e-smith
The result was:
Code: [Select]
run: /service/httpd-e-smith: (pid 9613) 4s, normally down
But I still can't access the server-manager.....
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 09:25:38 PM
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?
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 09:42:05 PM
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.....
Title: Re: server-manager was not found
Post by: Stefano on May 22, 2008, 09:51:19 PM
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
Code: [Select]
grep -i joomla /var/log/messages

Ciao
Stefano
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 09:57:20 PM
Stefano,

That gives no result, no output whatsoever
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 10:11:42 PM
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:
Code: [Select]
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:
Code: [Select]
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:


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
Code: [Select]
expand-template /etc/httpd/conf/httpd.confTest the configuration file
Code: [Select]
httpd -tIf it says the syntax is OK you can restart your webserver
Code: [Select]
sv t httpd-e-smith
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 10:13:39 PM
please post here the result of
Code: [Select]
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.
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 10:22:54 PM
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....
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 10:24:23 PM
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...
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 10:45:01 PM
the joomla configuration directives, would this be something like the contents of a template called 92joomla ?
Title: Re: server-manager was not found
Post by: EdelingF on May 22, 2008, 10:47:12 PM
YES! I can get into the server-manager again.
Will do the rest later
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 10:47:51 PM
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?
Title: Re: server-manager was not found
Post by: cactus on May 22, 2008, 10:48:35 PM
YES! I can get into the server-manager again.
Will do the rest later
I knew you would... good luck with the rest!
Title: Re: server-manager was not found
Post by: EdelingF on May 25, 2008, 10:08:58 PM
Cactus,

Ik took me a while to copy/paste the text from the 92joomla template, but here it is:

Code: [Select]
{
    $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/
Title: Re: server-manager was not found
Post by: asgeir on May 28, 2008, 07:00:36 AM
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? :-)
Title: Re: server-manager was not found
Post by: cactus on May 28, 2008, 07:23:23 AM
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.
Title: Re: server-manager was not found
Post by: EdelingF on June 02, 2008, 08:54:37 PM
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?
Title: Re: server-manager was not found
Post by: cactus on June 02, 2008, 09:12:23 PM
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:
Code: [Select]
expand-template /etc/httpd/conf/httpd.confTest the ne configuration:
Code: [Select]
httpd -tIf OK restart your webserver:
Code: [Select]
sv t httpd-e-smithIf 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).
Title: Re: server-manager was not found
Post by: EdelingF on June 09, 2008, 09:43:42 PM
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
Code: [Select]
{
    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
Code: [Select]
    ServerName {$virtualHost}
25SSLDirectives
Code: [Select]
{
    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
Code: [Select]
{
    $OUT =<<'HERE';
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
HERE
}

50DirectoryIndex00
Code: [Select]
# 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
Code: [Select]
{
    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
Code: [Select]
# 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
Code: [Select]
{
    $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
Code: [Select]
<VirtualHost {$ipAddress}:{$port}>
template-end
Code: [Select]
</VirtualHost>
I can't really find a line that redirects to /opt/joomla, so I think that's the problem?