Forum

Error 500 with Typo3 on Hiawatha

Sandfish
28 April 2011, 23:54
Hiawatha version: 7.4
Operating System: Debian Squeeze


Hello alltogether,

I'm quite new at Hiawatha and I'm even quite new with Linux so I have got a few problems in the cooperation with Typo3 and I hope you can help me. (I'm not sure if this question might be better located in a Typo3 forum)

I decided to use Hiawatha after reading an article about apache alternatives in the German magazin Linux User. Installing Hiawatha 7.4 on a fresh Debian Squeeze installation is quite easy with the unofficial *.deb-version (http://tuxhelp.org/pub/hiawatha/).

But my aim was to let the Typo3 CMS run on Hiawatha. I could not find a tutorial in the internet that deals with Hiawatha and Typo3. I only found tutorials describing the installation of Typo3 on an apache webserver. So I oriented a bit at this tutorial: http://wiki.typo3.org/TYPO3_Installation_Basics

First of all I installed mysql (apt-get install mysql), created a new database as well as a user both called 'typo3'. Then I downloaded Typo3 4.5.2 Source + Dummy from Sourceforge (http://sourceforge.net/projects/typo3/files/TYPO3%20Source%20and%20Dummy/TYPO3%204.5.2/) and copied it to '/var/www/'.
Then I changed the authorization like the following commands:

chown -R www-data:www-data<typo3_src-x.x.x>
chown -R www-data:www-data<myfirsttypo3>

After editing Hiawatha.conf and creating the file 'typo3conf/ENABLE_INSTALL_TOOL' I could access to http://localhost and configure Typo3. But it does not matter if I select the existing typo3-database or if a create a new database - after completing the configuration it is not possible to access to the site anymore (error 500). When you delete the localconf.php file Typo3 created you have access again to the Typo3 configuration.

A friend of mine tried Typo3 on Hiawatha, too but it was only possible for him to let Typo3 run on Apache.

Here is my Hiawatha.conf:
#
# /etc/hiawatha/hiawatha.conf
#


# GENERAL SETTINGS
#
ServerId = http
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log


# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
# Interface = 127.0.0.1
# MaxKeepAlive = 30
# TimeForRequest = 3,20
}
#
#Binding {
# Port = 443
# Interface = ::1
# MaxKeepAlive = 30
# TimeForRequest = 3,20
# SSLcertFile = hiawatha.pem
#}


# BANNING SETTINGS
# Deny service to clients who misbehave.
#
#BanOnGarbage = 300
#BanOnMaxPerIP = 60
#BanOnMaxReqSize = 300
#KickOnBan = yes
#RebanDuringBan = yes


# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications. Use the 'php-fcgi'
# tool to start PHP as a FastCGI daemon.
#
#CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/php-cgi:php
#CGIhandler = /usr/bin/python:py
#CGIhandler = /usr/bin/ruby:rb
#CGIhandler = /usr/bin/ssi-cgi:shtml
#CGIextension = cgi
#
#FastCGIserver {
# FastCGIid = PHP5
# ConnectTo = 127.0.0.1:2005
# Extension = php, php5
# SessionTimeout = 30
#}


# URL TOOLKIT
# This URL toolkit rule was made for the Banshee PHP framework, which
# can be downloaded from http:/www.hiawatha-webserver.org/banshee
#
#UrlToolkit {
# ToolkitID = banshee
# RequestURI isfile Return
# Match ^/(css|files|images|js)/ Return
# Match ^/(favicon.ico|robots.txt|sitemap.xml)$ Return
# Match .*\?(.*) Rewrite /index.php?$1
# Match .* Rewrite /index.php
#}


# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = Server
WebsiteRoot = /tmp/www-test
StartFile = index.php, index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi
ExecuteCGI = yes
TimeForCGI = 25

# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
#VirtualHost {
# Hostname = www.my-domain.com
# WebsiteRoot = /srv/http/my-domain/public
# StartFile = index.php
# AccessLogfile = /srv/http/my-domain/log/access.log
# ErrorLogfile = /srv/http/my-domain/log/error.log
# TimeForCGI = 5
# UseFastCGI = PHP5
# UseToolkit = banshee
#}


# DIRECTORY SETTINGS
# You can specify some settings per directory.
#
#Directory {
# Path = /home/baduser
# ExecuteCGI = no
# UploadSpeed = 10,2
#}

I hope you can help me, thank you in advance

Sandfish



Hugo Leisink
29 April 2011, 07:53
TYPO3 needs URL rewriting to work properly (see _.htaccess in the TYPO3 directory). I just installed TYPO3 and it worked perfectly. Add the following line to the DEFAULT WEBSITE block:
UseToolkit = typo3

change the StartFile to:
StartFile = index.php

and also add the following URL rewrite rule (place it somewhere in hiawatha.conf):
UrlToolkit {
ToolkitID = typo3
RequestURI exists Return
Match .* Rewrite /index.php
}
Hugo Leisink
29 April 2011, 10:07
Please note that you are not using PHP in FastCGI mode. PHP in FastCGI mode is 15 times faster than normal PHP. How to use PHP in FastCGI mode, can be found in this HOWTO page.
This topic has been closed.