Tags:
create new tag
view all tags

SID-00838: Can't get configure to come up.... 500 Internal Server Error

Status: Answered Answered TWiki version: 4.3.2 Perl version: Perl 5.8.8
Category: CategoryInstallation Server OS: CentOS 5.4 kernel 2.6.18-164.el5 Last update: 15 years ago

Can't seem to get TWiki configured. I have it installed and the "Welcome to TWiki" page comes up in the browser, but when I click on configure, it times out and eventually gives me a 500 Internal Server Error.

My httpd log shows this:

[Thu May 13 12:41:49 2010] [warn] [client 10.20.0.141] Timeout waiting for output from CGI script /var/www/twiki.mydomain.com/bin/configure, referer: http://twiki.mydomain.com/
[Thu May 13 12:41:49 2010] [error] [client 10.20.0.141] Premature end of script headers: configure, referer: http://twiki.mydomain.com/
[Thu May 13 12:43:49 2010] [warn] [client 10.20.0.141] Timeout waiting for output from CGI script /var/www/twiki.mydomain.com/bin/configure, referer: http://twiki.mydomain.com/

I generated my twiki.conf from the Apache Config Generator. I did have to comment out one small perl section or else Apache wouldn't start up. See below:

# We set an environment variable called blockAccess.
#
# Setting a BrowserMatchNoCase to ^$ is important. It prevents TWiki from
# including its own topics as URLs and also prevents other TWikis from
# doing the same. This is important to prevent the most obvious
# Denial of Service attacks.
#
# You can expand this by adding more BrowserMatchNoCase statements to
# block evil browser agents trying the impossible task of mirroring a twiki
#
# Example:
# BrowserMatchNoCase ^SiteSucker blockAccess
# BrowserMatchNoCase ^$ blockAccess

BrowserMatchNoCase ^Accoona blockAccess
BrowserMatchNoCase ^ActiveAgent blockAccess
BrowserMatchNoCase ^Attache blockAccess
BrowserMatchNoCase BecomeBot blockAccess
BrowserMatchNoCase ^bot blockAccess
BrowserMatchNoCase Charlotte/ blockAccess
BrowserMatchNoCase ^ConveraCrawler blockAccess
BrowserMatchNoCase ^CrownPeak-HttpAgent blockAccess
BrowserMatchNoCase ^EmailCollector blockAccess
BrowserMatchNoCase ^EmailSiphon blockAccess
BrowserMatchNoCase ^e-SocietyRobot blockAccess
BrowserMatchNoCase ^Exabot blockAccess
BrowserMatchNoCase ^FAST blockAccess
BrowserMatchNoCase ^FDM blockAccess
BrowserMatchNoCase ^GetRight/6.0a blockAccess
BrowserMatchNoCase ^GetWebPics blockAccess
BrowserMatchNoCase ^Gigabot blockAccess
BrowserMatchNoCase ^gonzo1 blockAccess
BrowserMatchNoCase ^Google\sSpider blockAccess
BrowserMatchNoCase ^ichiro blockAccess
BrowserMatchNoCase ^ie_crawler blockAccess
BrowserMatchNoCase ^iGetter blockAccess
BrowserMatchNoCase ^IRLbot blockAccess
BrowserMatchNoCase Jakarta blockAccess
BrowserMatchNoCase ^Java blockAccess
BrowserMatchNoCase ^KrakSpider blockAccess
BrowserMatchNoCase ^larbin blockAccess
BrowserMatchNoCase ^LeechGet blockAccess
BrowserMatchNoCase ^LinkWalker blockAccess
BrowserMatchNoCase ^Lsearch blockAccess
BrowserMatchNoCase ^Microsoft blockAccess
BrowserMatchNoCase ^MJ12bot blockAccess
BrowserMatchNoCase MSIECrawler blockAccess
BrowserMatchNoCase ^MSRBOT blockAccess
BrowserMatchNoCase ^noxtrumbot blockAccess
BrowserMatchNoCase ^NutchCVS blockAccess
BrowserMatchNoCase ^RealDownload blockAccess
BrowserMatchNoCase ^Rome blockAccess
BrowserMatchNoCase ^Roverbot blockAccess
BrowserMatchNoCase ^schibstedsokbot blockAccess
BrowserMatchNoCase ^Seekbot blockAccess
BrowserMatchNoCase ^SiteSnagger blockAccess
BrowserMatchNoCase ^SiteSucker blockAccess
BrowserMatchNoCase ^Snapbot blockAccess
BrowserMatchNoCase ^sogou blockAccess
BrowserMatchNoCase ^SpiderKU blockAccess
BrowserMatchNoCase ^SpiderMan blockAccess
BrowserMatchNoCase ^Squid blockAccess
BrowserMatchNoCase ^Teleport blockAccess
BrowserMatchNoCase ^User-Agent\: blockAccess
BrowserMatchNoCase VoilaBot blockAccess
BrowserMatchNoCase ^voyager blockAccess
BrowserMatchNoCase ^W3C blockAccess
BrowserMatchNoCase ^w3search blockAccess
BrowserMatchNoCase ^Web\sDownloader blockAccess
BrowserMatchNoCase ^WebCopier blockAccess
BrowserMatchNoCase ^WebDevil blockAccess
BrowserMatchNoCase ^WebSec blockAccess
BrowserMatchNoCase ^WebVac blockAccess
BrowserMatchNoCase ^Webwhacker blockAccess
BrowserMatchNoCase ^Webzip blockAccess
BrowserMatchNoCase ^Wells blockAccess
BrowserMatchNoCase ^WhoWhere blockAccess
BrowserMatchNoCase www\.netforex\.org blockAccess
BrowserMatchNoCase ^WX_mail blockAccess
BrowserMatchNoCase ^yacybot blockAccess
BrowserMatchNoCase ^ZIBB blockAccess
BrowserMatchNoCase ^$ blockAccess

# !!!!!!!!!!!!!!!!!!!! I HAD TO COMMENT OUT THIS SECTION OR APACHE WOULD NOT START!!!!!!!!!!!!!!!!!!!!!!!
#<IfModule mod_perl.c>
#    # Mod_perl preloading
#    PerlRequire /var/www/twiki.mydomain.com/tools/mod_perl_startup.pl
#    PerlSwitches -T
#</IfModule>
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

# The ScriptAlias defines the bin directory as a directory where CGI
# scripts are allowed.
# The first parameter will be part of the URL to your installation e.g.
# http://example.com/twiki/bin/view/...
# The second parameter must point to the physical path on your disc.
ScriptAlias /twiki/bin "/var/www/twiki.mydomain.com/bin"

# The Alias defines a url that points to the twiki pub directory, which
# is the root of file attachments.
Alias /twiki/pub "/var/www/twiki.mydomain.com/pub"


# This specifies the options on the TWiki scripts directory. The ExecCGI
# and SetHandler tell apache that it contains scripts. "Allow from all"
# lets any IP address access this URL.
<Directory "/var/www/twiki.mydomain.com/bin">
    AllowOverride None
    Order Allow,Deny
    Allow from all
    Deny from env=blockAccess

    Options ExecCGI FollowSymLinks
    SetHandler cgi-script

    # Password file for TWiki users
    AuthUserFile /var/www/twiki.mydomain.com/data/.htpasswd
    AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith)'
    AuthType Basic

    # File to return on access control error (e.g. wrong password)
    ErrorDocument 401 /twiki/bin/view/TWiki/TWikiRegistration

# Limit access to configure to specific IP addresses and or users.
# Make sure configure is not open to the general public.
# It exposes system details that can help attackers.
<FilesMatch "^(configure)$">
    SetHandler cgi-script
    Order Deny,Allow
    Allow from all
</FilesMatch>

# Enable mod_perl for the bin scripts listed
<IfModule mod_perl.c>
    <FilesMatch \"(attach|edit|manage|rename|save|upload|view|rest|.*auth).*\">
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlSendHeader On
        PerlOptions +ParseHeaders
    </FilesMatch>
</IfModule>
</Directory>

# This sets the options on the pub directory, which contains attachments and
# other files like CSS stylesheets and icons. AllowOverride None stops a
# user installing a .htaccess file that overrides these options.
# Note that files in pub are *not* protected by TWiki Access Controls,
# so if you want to control access to files attached to topics you need to
# block access to the specific directories same way as the ApacheConfigGenerator
# blocks access to the pub directory of the Trash web
<Directory "/var/www/twiki.mydomain.com/pub">
    Options None
    AllowOverride None
    Order Allow,Deny
    Allow from all
    Deny from env=blockAccess

    # Disable execusion of PHP scripts
    php_admin_flag engine off

    # This line will redefine the mime type for the most common types of scripts
    AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
#
#add an Expires header that is sufficiently in the future that the browser does not even ask if its uptodate
# reducing the load on the server significantly
#IF you can, you should enable this - it _will_ improve your twiki experience, even if you set it to under one day.
# you may need to enable expires_module in your main apache config
#LoadModule expires_module libexec/httpd/mod_expires.so
#AddModule mod_expires.c
#<ifmodule mod_expires.c>
#  <filesmatch "\.(jpg|gif|png|css|js)$">
#       ExpiresActive on
#       ExpiresDefault "access plus 11 days"
#   </filesmatch>
#</ifmodule>
#

</Directory>

One maybe important note: My Twiki installation is not at this type of address:

http://mydomain.com/twiki/

Instead I have apache setup with it like this:

http://twiki.mydomain.com/

Here is my other apache conf for this:

<VirtualHost *:80>
	ServerAdmin webmaster@answeron.com
	DocumentRoot /var/www/twiki.mydomain.com
	ServerName twiki.mydomain.com
	ErrorLog logs/twiki.mydomain.com-error_log
	CustomLog logs/twiki.mydomain.com-access_log common
</VirtualHost>

So what do I need to change to get Twiki configured? So far I'm bummed that installing TWiki is such a pain frown

-- JakeEWilson - 2010-05-13

Discussion and Answer

Could be a permission issue. Related recent support questions for "Premature end of script headers":

-- PeterThoeny - 2010-05-13

Thanks for searching for me, but none of those really describe my problem. And half of them don't really even say how people found their answer. As far as permissions go, every single folder and file in my twiki installation is owned by apache:apache. I even set the bin/configure script to 777 just to see if that was the issue and I got the same result.

I've never been a perl fan. This experience of just simply trying to install this on a default/vanilla CentOS setup is reassuring my disdain for it :-/

-- JakeEWilson - 2010-05-13

This is an Apache config issue, unlikely related to Perl. Place a Python/C/shell scrip "hello world" CGI program in the bin directory to verify.

-- PeterThoeny - 2010-05-13

It might be related to SELinux. Disable to test. Search this support forum for SELinux related issues.

-- PeterThoeny - 2010-05-13

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2010-07-04

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Can't get configure to come up.... 500 Internal Server Error
SupportCategory CategoryInstallation
TWiki version 4.3.2
Server OS CentOS 5.4 kernel 2.6.18-164.el5
Web server Apache/2.2.3
Perl version Perl 5.8.8
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-07-04 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.