Forum

Some issues in Hiawatha (testing for 9.8)

Mustafa Ramadhan
10 October 2014, 09:04


Hiawatha version: 9.8
Operating System: CentOS 6

I found some issues (bugs?) in Hiawatha 9.8 (possible in previous version also):

A. Relate to Polarssl:

1. Compile to rpm (in CentOS) always refer to built-in polarssl library (library inside Hiawatha source)
2. If want using system's polarssl, delete /usr/lib/hiawatha directory and install polarssl rpm

I used this trick inside hiawatha.spec (execute 'cmake' and then delete /usr/lib/hiawatha). It's because 'USE_SYSTEM_POLARSSL:BOOL=ON' still not work.

B. Relate to .hiawatha

1. Create .hiawatha in website docroot and insert UrlToolkit make 'Error 502' in website:
UrlToolkit {
ToolkitID = wordpress
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}

UrlToolkit {
ToolkitID = redirect
#RequestURI exists Return
Match ^/kloxo(/|$) Redirect https://kloxomr7.mratwork.com:7777/$1
Match ^/kloxononssl(/|$) Redirect http://kloxomr7.mratwork.com:7778/$1
Match ^/webmail(/|$) Redirect http://webmail.kloxomr7.mratwork.com/$1
Match ^/cp(/|$) Redirect http://cp.kloxomr7.mratwork.com/$1
}

## MR -- still appear 'error 502' with enable/disable UseToolkit
UseToolkit = wordpress, redirect
Hugo Leisink
10 October 2014, 09:33
First, install the PolarSSL package. Then add "-DUSE_SYSTEM_POLARSSL=on" to the cmake command at line 24 in extra/redhat/hiawatha.spec and execute the extra/make_redhat_package script. This should create a Hiawatha Red Hat package that uses the system's PolarSSL library.

Hiawatha never generates a 502 error. And the UrlToolkit should not be placed in a .hiawatha file. Place it in hiawatha.conf and only place the UseToolkit option in the .hiawatha file.
Mustafa Ramadhan
10 October 2014, 14:55
Add:
UrlToolkit {
ToolkitID = wordpress
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}


or just:
    RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php


have the same error ('Internal Server Error 500').
Hugo Leisink
10 October 2014, 14:58


/etc/hiawatha/hiawatha.conf:
UrlToolkit {
ToolkitID = wordpress
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}


/var/www/domain/www/.hiawatha:
UseToolkit = wordpress
Mustafa Ramadhan
10 October 2014, 15:21
Sadly use .hiawatha with content 'UseToolkit' only not the same as .htaccess do.

Add ;-DUSE_SYSTEM_POLARSSL=on' always show 'error: File not found: /var/tmp/hiawatha-9.8.0-f.2.mr.el5-root-root/usr/lib/hiawatha'.
Hugo Leisink
10 October 2014, 15:31
Correct, .hiawatha works differently from .htaccess. Hiawatha ain't Apache.

Remove or comment line 67, "%attr(-, root, root) %{_libdir}/hiawatha/", in extra/redhat/hiawatha.spec.
This topic has been closed.