SID-01122: cannot run configure, internal server error 500
| Status: |
Answered |
TWiki version: |
5.0.1 |
Perl version: |
Perl 5.12.3 |
| Category: |
CategoryInstallation |
Server OS: |
Fedora 2.6.35.11 |
Last update: |
14 years ago |
Hi,
I get an internal (500) server error when trying to run the TWiki configure script:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.17 (Fedora) Server at mikes-fedora Port 80
--
The httpd error log shows:
[Wed Mar 09 10:21:17 2011] [error] [client 192.168.1.100] (13)Permission denied: exec of '/var/www/twiki/bin/configure' failed, referer:
http://mikes-fedora/twiki/
[Wed Mar 09 10:21:17 2011] [error] [client 192.168.1.100] Premature end of script headers: configure, referer:
http://mikes-fedora/twiki/
I am running
Fedora 2.6.35.11
PHP 5.3.5
Perl 5.12.3
TWiki 5.0.1
with a pretty much default installation configuration for both Fedora and TWiki. The TWiki root path is /var/www/twiki.
Permissions in twiki path are set to defaults (as unpacked) but owner:group is apache:apache.
The config file /etc/httpd/conf.d/twiki.conf was generated from the online TWiki tool (
http://twiki.org/cgi-bin/view/TWiki.ApacheConfigGenerator
, see below).
I tried changing ownership, permissions of ~twiki/bin/configure to root - no difference. I also tried solutions to similar problems on this web site but none affected this problem.
I'm pretty sure the problem lies in the httpd configuration but am not experienced enough in Apache to fully comprehend it.
Thoughts, ideas, comments? Thanks.
# Autogenerated httpd.conf file for TWiki.
# Generated at
http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator
# 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
<IfModule mod_perl.c>
# Mod_perl preloading
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/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/pub"
# Global httpd settings
Alias /twiki/ "/var/www/twiki/"
<Directory "/var/www/twiki">
Options Indexes
MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# 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/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/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
Deny from all
Allow from localhost, mikes-fedora
Require user Administrator
Satisfy Any
</FilesMatch>
</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/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
expires_module libexec/httpd/mod_expires.so
mod_expires.c
#<ifmodule mod_expires.c>
# <filesmatch "\.(jpg|gif|png|css|js)$">
#
ExpiresActive on
#
ExpiresDefault "access plus 11 days"
# </filesmatch>
#</ifmodule>
#
</Directory>
# Spammers are known to attach their stuff and then move it to trash where it remains unnoticed.
# We prevent viewing any attachments directly from pub
<Directory "/var/www/twiki/pub/Trash">
deny from all
</Directory>
--
MikePitcher - 2011-03-09
Discussion and Answer
Same Problem here.
Have you fixed it yet?
I can run the configure script once, but on the last stage where I can click "save" i got a 500 internal server error. From this point I cant run the script again. First I have to restart my apache.
--
RolandWurzer - 2011-03-15
Mike: Permission denied, exec of '/var/www/twiki/bin/configure' failed is an indication that the script cannot be executed due to permission issues. Check the file ownership and permission of the configure script and of the twiki/bin directory. In case you run under Selinux, turn it off to check if this is the issue.
Roland: If you get a 500 internal server error, check the apache error_log, it tells more details.
--
PeterThoeny - 2011-03-16
I disabled selinux and rebooted the server. Works ok now. Thanks!
--
MikePitcher - 2011-03-17
Consider re-enable selinux and configure it to allow the twiki scripts.
--
PeterThoeny - 2011-03-17
Hi,
When I try
http://<myip>:8769/bin/configure
in my browser after all setup, I get error 500. When I see apache error logs it says
[Fri Sep 23 15:04:57 2011] [error] [client myip] Can't locate strict.pm in
@INC
(
@INC
contains: /tmp/perl---------------------------------------------please-run-the-install-script---------------------------------------------/site/lib /tmp/perl---------------------------------------------please-run-the-install-script---------------------------------------------/lib .) at <myhome>/bin/configure line 71.
[Fri Sep 23 15:04:57 2011] [error] [client myip] BEGIN failed--compilation aborted at <myhome>/bin/configure line 71.
[Fri Sep 23 15:04:57 2011] [error] [client myip] Premature end of script headers: configure
Please help
Thanks,
Sunil
--
SunilAddagadde - 2011-09-23
It is best to open a new support question with detail of environment. It is hard to help without enough info, such as OS. If Oracle Linux see
http://oracleappstechnology.blogspot.com/2011/05/cant-locate-strictpm-in-inc.html
--
PeterThoeny - 2011-09-23
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.