Koozali.org: home of the SME Server

Web Application Redirect

Offline EdelingF

  • *****
  • 215
  • +0/-0
Web Application Redirect
« on: January 03, 2009, 08:03:48 PM »
I've installed Wordpress in /opt and used the http://wiki.contribs.org/Web_Application_Redirect_Tutorial to redirect Wordpress to one of my domains.
I know this HowTo also results in not being able to use the Server-Manager. But since I don't know of and can't find another solution, I'm forced to use this one. The HTML-redirect is one option, but it slows down and will possibly give me problems with search-engines I think (?).
Isn't there a workaround to get Server-Manager working again by a hack or something?
I can't imagine SME isn't able to redirect applications properly to (virtual) domains.......
...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Web Application Redirect
« Reply #1 on: January 04, 2009, 05:45:45 PM »
I've installed Wordpress in /opt and used the http://wiki.contribs.org/Web_Application_Redirect_Tutorial to redirect Wordpress to one of my domains.
I know this HowTo also results in not being able to use the Server-Manager. But since I don't know of and can't find another solution, I'm forced to use this one. The HTML-redirect is one option, but it slows down and will possibly give me problems with search-engines I think (?).
Isn't there a workaround to get Server-Manager working again by a hack or something?
I can't imagine SME isn't able to redirect applications properly to (virtual) domains.......
Off course: make a custom template exposing the wordpress folder in /opt to the outside world using the webserver configuration file. I do not know what the configuration settings are.
BTW Why don't you use the contrib?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline EdelingF

  • *****
  • 215
  • +0/-0
Re: Web Application Redirect
« Reply #2 on: January 04, 2009, 07:25:33 PM »
I've used the Wordpress contrib.
Do you mean I have to use and alter something in the 92wordpress-template?
Code: [Select]
{
     my $status = $wordpress{'status'} || "disabled";
     return "    # wordpress is disabled in this VirtualHost"
            unless $status eq 'enabled';
   
    $OUT = "";
    my $allow = 'all';
    my $pass = '0';
    my $satisfy = 'all';
    my $name = $wordpress{'Name'} || 'Wordpress weblog';

    for ('exit-if-none')
    {
      if ($wordpress{'PublicAccess'})
      {
          if ($wordpress{'PublicAccess'} eq 'none')
          {
           next;
          }
          elsif ($wordpress{'PublicAccess'} eq 'local')
          {
            $allow   = $localAccess;
            $pass    = 0;
            $satisfy = 'all';
          }
          elsif ($wordpress{'PublicAccess'} eq 'local-pw')
          {
            $allow   = $localAccess;
            $pass    = 1;
            $satisfy = 'all';
          }
          elsif ($wordpress{'PublicAccess'} eq 'global')
          {
            $allow   = 'all';
            $pass    = 0;
            $satisfy = 'all';
          }
          elsif ($wordpress{'PublicAccess'} eq 'global-pw')
          {
            $allow   = 'all';
            $pass    = 1;
            $satisfy = 'all';
          }
          elsif ($wordpress{'PublicAccess'} eq 'global-pw-remote')
          {
            $allow   = $localAccess;
            $pass    = 1;
            $satisfy = 'any';
          }
      }
     
      $OUT .= "#------------------------------------------------------------\n";
      $OUT .= "# wordpress - $name\n";
      $OUT .= "#------------------------------------------------------------\n";

      {
        if (exists $wordpress{'URL'})
        { $OUT .= "Alias  /$wordpress{'URL'}  /opt/wordpress\n"; }
      }

      $OUT .= "Alias  /wordpress  /opt/wordpress\n";
      $OUT .= "\n";
      $OUT .= "<Directory /opt/wordpress>\n";
      $OUT .= "    AddType application/x-httpd-php .php\n";
      $OUT .= "    php_admin_value open_basedir /opt/wordpress:/opt/gallery2\n";
      $OUT .= "    Options None\n";
      $OUT .= "    order deny,allow\n";
      $OUT .= "    deny from all\n";
      $OUT .= "    allow from $allow\n";
      $OUT .= "    php_value mysql.default_host $wordpress{DbName}\n";
      $OUT .= "    php_value mysql.default_user $wordpress{DbUser}\n";
      $OUT .= "    php_value mysql.default_password $wordpress{DbPassword}\n";
      if ($pass)
      {
          $OUT .= "    AuthName \"$name\"\n";
          $OUT .= "    AuthType Basic\n";
          $OUT .= "    AuthExternal pwauth\n";
          $OUT .= "    require valid-user\n";
          $OUT .= "    Satisfy $satisfy\n";
      }
      $OUT .= "</Directory>\n";
    }
}
...