create new tag
, view all tags

SID-02158: Configure Script not running

Status: Asked Asked TWiki version: 6.0.1 Perl version: not sure
Category: CategoryInstallation Server OS: centos Last update: 10 months ago

When I go to the http://IP/twiki/bin/configure the file comes up as though I am editing the file.

I went to the directory and copied the file to include the file to be .cgi and .pl thinking that it was an extension issue and no change

I followed the steps precisely and used the generator..

Not sure what I am doing wrong.. I am new to all of this and its confusing to me.. Sorry , this has probably been asked a zillion times.. I also verified that perl is in the default location and the script files have that location in its file location.. ANy advice would be appreciated

-- christopher DeSmit - 2016-02-24

Discussion and Answer

here is the result of the file:

# 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 ^$ blockAccess

<IfModule mod_perl.c>
    # Mod_perl preloading
    PerlSwitches -T

# 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/do/view/...
# The second parameter must point to the physical path on your disc.
ScriptAlias /do "/var/www/twiki/bin"

# The Alias defines a url that points to the twiki pub directory, which
# is the root of file attachments.
Alias /pub "/var/www/twiki/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/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 /do/view/TWiki/TWikiRegistration


# 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
#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>


-- christopher DeSmit - 2016-02-24

Based on your ScriptAlias you need to visit http://IP/do/configure.

If you see configure on http://IP/twiki/bin/configure you have a potential security issue. The /var/www/twiki must not be exposed as a HTML doc root.

-- Peter Thoeny - 2016-02-24

Thanks Peter.. WHen I go to http://IP/twiki/bin/configure nothing is displayed..unable to connect

-- christopher DeSmit - 2016-02-24

I meant to say... when I go to http://IP/do/configure

-- christopher DeSmit - 2016-02-24

If you still can see http://IP/twiki/bin/configure as text, look at your global apache configuration; /var/www/twiki must not be exposed as a HTML doc root. This could interfere with the ScripAlias.

-- Peter Thoeny - 2016-02-24

peter.. wasnt that what I posted above? the output of the generator working?? Im confused.. but will check it over again

-- christopher DeSmit - 2016-02-24

I am about to wipe out the server once again and start completely over... I did exactly as the instructions stated and not sure what I did wrong.. this has got to be a common newbie error.

-- christopher DeSmit - 2016-02-24

any suggestions?

-- christopher DeSmit - 2016-02-25

ANy ideas or thought out there anyone??

-- christopher DeSmit - 2016-02-25

The autogenerated httpd.conf file for TWiki you posted looks good. Make sure your global apache config does not expose var/www/twiki.

To test if var/www/twiki/bin is really script enabled and accessible via /do URL path, add a hello world CGI script. Here is one:

print "Content-type: text/html\n\n";
print "Hello, world!\n";

Save this as helloworld in var/www/twiki/bin and access it as http://IP/do/helloworld - you should see just text Hello, world, not perl code.

-- Peter Thoeny - 2016-02-26

when I go to anything in or invoke http://ip/do this folder or anything in it isnt executing..like the folder doesnt exist or not executable

-- christopher DeSmit - 2016-02-27

Did you restart httpd?

-- Peter Thoeny - 2016-02-27

In any case it is helpful to describe the symptoms as exactly as possible. "Folder doesn't exist" or "not executable" are different things, and should give different messages on the screen, and in Apache's error log file /var/log/httpd/error_log. A few days the error was "unable to connect" - this points to some problem with the Apache server (maybe a syntax error in the configuration) or your network, not at all related to TWiki.

Unfortunately, the steps 6 and 7 of the installation guide can't keep up with the different ways in which Linux distributions do their configuration. Have you used the CentOS GUI for Apache (see https://www.centos.org/docs/5/html/5.2/Deployment_Guide/ch-httpd.html) or have you manually edited the config files?

-- Harald Jörg - 2016-02-27

hello peter.

I was trying to configure TWiki in windows. while i am going with http://Ip/do/configure i am getting error in browser. it's getting access forbidden. could you plz suggest what is have to do.?

-- TWiki Guest - 2017-05-09

Status Asked
Title Configure Script not running
SupportCategory CategoryInstallation
TWiki version 6.0.1
Server OS centos
Web server apache
Perl version not sure
Browser & version firefox
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2017-05-09 - TWikiGuest
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.