Tags:
create new tag
view all tags

SID-02117: /bin/configure shows only text

Status: Answered Answered TWiki version: 6.0.1 Perl version: v5.16.3
Category: CategoryInstallation Server OS: CentOS 7 Last update: 10 years ago

Hello,

I`m not pretty new to Linux, but I`m also not that pro in it. The problem seems very common, when i try to run the configure it only shows the Text version of it.

I already did the ApacheConfigGenerator and insert it with no change.

  • twiki is stored in the /var/www/cgi-bin/twiki (also tried /var/www/twiki and www/html/twiki)

  • perl: /usr/bin/perl

  • while setup cpan i just did the default settings, after that i installed all the required modules

  • LocalLib.cfg:
use vars qw( $twikiLibPath $CPANBASE );

#development and debugging settings
#$ENV{TWIKI_ASSERTS} = 1;
#$ENV{TWIKI_MONITOR} = 1;   # Basic monitoring = 1, more monitoring = 2

# ------------++ Path to lib directory containing TWiki.pm.
# REQUIRED:
# The absolute path to the 'lib' directory in your installation..

$twikiLibPath = "/var/www/cgi-bin/twiki/lib";

# ------------++ Path to TWiki's CPAN base.
# OPTIONAL:
# TWiki ships with some CPAN modules, such as File::Temp. They load after
# the default Perl libs. If you want to load them before the system libs,
# uncomment the following line.

# $CPANBASE = "$twikiLibPath/CPAN/lib/";




# @localPerlLibPath = ( '/path/to/dir' );
  • httpd.conf:
Listen 80
Listen 8081

Include conf.modules.d/*.conf

#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule cgi_module modules/mod_cgi.so
.
.
.
<VirtualHost *:8081>

        DocumentRoot /var/www/cgi-bin/twiki/


        Include /etc/httpd/conf.d/twiki_httpd.conf

</VirtualHost>
.
.
.
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
.
.
.
IncludeOptional conf.d/*.conf

  • twiki_httpd.conf
rowserMatchNoCase ^$ blockAccess

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

ScriptAlias http://IP:port/bin "/var/www/twiki/bin"

Alias       http://IP:port/pub/TWiki   "/var/www/twiki/pub/TWiki"
Alias       http://IP:port/pub/Sandbox "/var/www/twiki/pub/Sandbox"
ScriptAlias http://IP:port/pub         "/var/www/twiki/bin/viewfile"


SetEnvIf Request_URI "http://IP:port/pub/.*\.[hH][tT][mM][lL]?$" blockAccess
SetEnvIf Request_URI "http://IP:port/pub/TWiki/.*\.[hH][tT][mM][lL]?$" !blockAccess


<Directory "/var/www/cgi-bin/twiki/bin">
Directory "/var/www/cgi-bin/twiki/bin">
    AllowOverride None
    Require all granted
    Deny from env=blockAccess

    Options ExecCGI FollowSymLinks
    SetHandler cgi-script


    AuthUserFile /var/www/cgi-bin/twiki/data/.htpasswd
    AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith)'
    AuthType Basic

    ErrorDocument 401 http://IP:PORT/bin/view/TWiki/TWikiRegistration

</Directory>

<Directory "/var/www/cgi-bin/twiki/pub">
    Options None
    AllowOverride None
    Require all granted
    Deny from env=blockAccess

    php_admin_flag engine off

    AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi

</Directory>

<Directory "/var/www/cgi-bin/twiki/pub/Trash">
   deny from all
</Directory>

Hope this helps, i can also provide more information if needed. Thanks for the help.

regards

Harald

-- harald Miller - 2015-10-28

Discussion and Answer

Don't put TWiki in a cgi-bin enabled directory, place it outside of any Apache enabled directory, and use the twiki.conf file to tell Apache to use twiki/bin as a cgi-bin, and twiki/pub as a html doc enabled directory. I recommend to follow the TWikiInstallationGuide, and use the ApacheConfigGenerator to generate the twiki.conf file.

-- Peter Thoeny - 2015-10-28

thanks for your help, dont know why its working now.... i already tried to move twiki to /var/www/ and changed config etc.

just for the next guy like me here is the actual config:

  • httpd.conf
Listen 80
Listen 8081
...
LoadModule cgi_module modules/mod_cgi.so
...
#twiki running on port 8081
<VirtualHost *:8081>
        DocumentRoot /var/www/
#       ServerName twiki.mydomain.com
#       ErrorLog logs/twiki.mydomain.com-error_log
#       CustomLog logs/twiki.mydomain.com-access_log common
        Include /etc/httpd/conf.d/twiki_httpd.conf
</VirtualHost>

  • twiki_httpd.conf
BrowserMatchNoCase ^$ blockAccess

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

ScriptAlias http://IP:PORT/twiki/bin "/var/www/twiki/bin"

Alias       http://IP:PORT/twiki/pub/TWiki   "/var/www/twiki/pub/TWiki"
Alias       http://IP:PORT/twiki/pub/Sandbox "/var/www/twiki/pub/Sandbox"
ScriptAlias http://IP:PORT/twiki/pub         "/var/www/twiki/bin/viewfile"

SetEnvIf Request_URI "http://IP:PORT/twiki/pub/.*\.[hH][tT][mM][lL]?$" blockAccess
SetEnvIf Request_URI "http://IP:PORT/twiki/pub/TWiki/.*\.[hH][tT][mM][lL]?$" !blockAccess

<Directory "/var/www/twiki/bin">
    AllowOverride None
    Require all granted
    Deny from env=blockAccess

    Options ExecCGI FollowSymLinks
    SetHandler cgi-script

    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

    ErrorDocument 401 http://IP:PORT/twiki/bin/view/TWiki/TWikiRegistration



</Directory>

<Directory "/var/www/twiki/pub">
    Options None
    AllowOverride None
    Require all granted
    Deny from env=blockAccess
    php_admin_flag engine off
    AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
</Directory>

<Directory "/var/www/twiki/pub/Trash">
   deny from all
</Directory>

regards

Harald

-- harald Miller - 2015-10-29

Note on the latest httpd.conf example: Do not declare /var/www as a html doc root because this exposes all /var/www/twiki to the browser world, which is a security issue. Only twiki/bin and twiki/pub can be exposed, others must not.

-- Peter Thoeny - 2015-10-29

      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 /bin/configure shows only text
SupportCategory CategoryInstallation
TWiki version 6.0.1
Server OS CentOS 7
Web server Apache 2.4.6
Perl version v5.16.3
Browser & version

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2015-10-29 - 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.