Tags:
create new tag
, view all tags

Question

I am having a problem with configure web page

It is not able to log me in

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Fedora Core 3
Web server: Apache 2.0-52
Perl version: /usr/bin/perl
Client OS: Fedora Core 3
Web Browser: Firefox 1.0
Categories: Htaccess

-- VictorPais - 13 Jul 2006

Answer

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.

No need to SHOUT! Maybe you just forget to disable CapsLock? wink

-- FranzJosefSilli - 13 Jul 2006

It is difficult the help with the little information at hand. Please review the SupportGuidelines and provide some more details.

-- PeterThoeny - 15 Jul 2006

[Tue Jul 18 12:07:37 2006] [alert] [client 202.122.16.101] /var/www/twiki/bin/.htaccess: /var/www/twiki/bin/.htaccess:56: <> was not closed.\n/var/www/twiki/bin/.htaccess:53: <> was not closed.\n/var/www/twiki/bin/.htaccess:51: <> was not closed.\n/var/www/twiki/bin/.htaccess:46: <> was not closed., referer: http://202.122.16.101/twiki/

my /var/www/twiki/bin/.htaccess is of the following

BrowserMatchNoCase ^$ anonymous_spider

# Now set default access rights.
Order Allow,Deny
Allow from all
Deny from env=anonymous_spider

# Use CGI & Perl to handle all files in 'bin' directory, i.e. run as scripts
# - this should remove the need to rename files to end in '.pl' etc,
# if your web hosting provider permits this.  Remove if using mod_perl.
SetHandler cgi-script

# Password file for TWiki users
#

# Authentication type (htpasswd file) (comment out this if you configure htpasswd / LDAP support)#AuthUserFile {DataDir}/.htpasswd
AuthUserFile /var/www/twiki/data/.htpasswd

AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
AuthType Basic
< Files ".*">
               SetHandler perl-script
               PerlHandler Apache::Registry
               Options ExecCGI
               PerlSendHeader On
 < /Files>

 < Files "upload">
               order allow,deny
               require valid-user
< /Files>
ErrorDocument 401 {ScriptUrlPath}/view/TWiki/TWikiRegistration

# Turn off directory indexing in this and sub directories
Options -Indexes

<FilesMatch "[^/]*\.html$">
       SetHandler blabla
       allow from all
</FilesMatch>

# configure should be restricted to a small number of users
<FilesMatch "configure.*">
       require user "{VictorPais,Administrators}"
</FilesMatch>


<FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|.*auth).*">
       require valid-user
</FilesMatch>


<FilesMatch ".*">
       allow from all
</FilesMatch>

<FilesMatch ".*">
       allow from all
</FilesMatch>

<FilesMatch "register">
       deny from all
</FilesMatch>

-- VictorPais - 18 Jul 2006

I have solved the previous problem My real problem which I am facing is when i put in twiki name and passwd

I get a error in error_log message as

[Tue Jul 18 12:28:10 2006] [error] [client 202.122.16.101] access to /twiki/bin/configure failed, reason: user VictorPais not allowed access, referer: http://202.122.16.101/twiki/

-- VictorPais - 18 Jul 2006

when i use http://202.122.16.101/twiki/bin/register and http://202.122.16.101/twiki/bin/view

I get error

[Tue Jul 18 12:53:19 2006] [error] [client 202.122.16.101] [Tue Jul 18 12:53:19 2006] TWiki.cfg: Useless use of a constant in void context at /var/www/twiki/lib/TWiki.cfg line 285.
[Tue Jul 18 12:53:19 2006] [error] [client 202.122.16.101] Can't locate CGI/Session.pm in @INC (@INC contains: /var/www/twiki/lib/CPAN/lib//arch/ /var/www/twiki/lib/CPAN/lib//5.8.5/i386-linux-thread-multi/ /var/www/twiki/lib/CPAN/lib//5.8.5/ /var/www/twiki/lib/CPAN/lib// /var/www/twiki/lib . /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at (eval 17) line 1.
[Tue Jul 18 12:53:19 2006] [error] [client 202.122.16.101] BEGIN failed--compilation aborted at (eval 17) line 1.
[Tue Jul 18 12:53:19 2006] [error] [client 202.122.16.101] Premature end of script headers: register
[Tue Jul 18 12:54:14 2006] [error] Can't locate CGI/Session.pm in @INC (@INC contains: . /var/www/twiki/lib/CPAN/lib//arch/ /var/www/twiki/lib/CPAN/lib//5.8.5/i386-linux-thread-multi/ /var/www/twiki/lib/CPAN/lib//5.8.5/ /var/www/twiki/lib/CPAN/lib// /var/www/twiki/lib /var/www/twiki/bin /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /etc/httpd/ /etc/httpd/lib/perl) at (eval 17) line 1.\nBEGIN failed--compilation aborted at (eval 17) line 1.\n

-- VictorPais - 18 Jul 2006

I AM USING TWIKI (DAKAR RELEASE)

$RELEASE=>'TWiki-4.0.4'
$VERSION=>'$Date: 2006-07-04 16:58:06 +0200 (Tue, 04 Jul 2006) $ $Rev: 10807 $ ';

-- VictorPais - 18 Jul 2006

On access to /twiki/bin/configure failed error, proper .htaccess syntax is:

<FilesMatch "configure.*">
       require user VictorPais
</FilesMatch>

On Can't locate CGI/Session.pm message: If you are using session tracking you need to install the CPAN:CGI::Sessions module.

-- PeterThoeny - 18 Jul 2006

when I type http://202.122.16.101/twiki/bin/configure I get this error

[error] [client 202.122.16.101] user VictorPais not found: /twiki/bin/configure, referer: http://202.122.16.101/twiki/

I can login at http://twiki.org/cgi-bin/view/Support with my login and passwd. but I cannot with http://202.122.16.101/twiki/bin/configure

I will give you my entire configuration lists:

1) httpd.conf

ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>
Listen 202.122.16.101:80
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
Include conf.d/*.conf
User apache
Group apache

ServerAdmin root@lnxw18.powerplay.com
UseCanonicalName Off
DocumentRoot "/var/www/twiki/pub"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/var/www/twiki/pub">
 Options Indexes FollowSymLinks
AllowOverride None
 Order allow,deny
    Allow from all

</Directory>
<IfModule mod_userdir.c>
 UserDir public_html

</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log common
CustomLog logs/referer_log referer
CustomLog logs/agent_log agent
CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>
# Generated at http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator

# Block access to typical spam related attachments
# Except the TWiki directory which is read only and does have attached html files.
SetEnvIf Request_URI "twiki/pub/.*\.[hH][tT][mM]?$" blockAccess
SetEnvIf Request_URI "twiki/pub/TWiki/.*\.[hH][tT][mM]?$" !blockAccess

#Block access from badly behaving robots and site sucking type programs.
BrowserMatchNoCase ^SiteSucker blockAccess
BrowserMatchNoCase ^iGetter blockAccess
BrowserMatchNoCase ^larbin blockAccess
BrowserMatchNoCase ^LeechGet blockAccess
BrowserMatchNoCase ^RealDownload blockAccess
BrowserMatchNoCase ^Teleport blockAccess
BrowserMatchNoCase ^Webwhacker blockAccess
BrowserMatchNoCase ^WebDevil blockAccess
BrowserMatchNoCase ^Webzip blockAccess
BrowserMatchNoCase ^Attache blockAccess
BrowserMatchNoCase ^SiteSnagger blockAccess
BrowserMatchNoCase ^WX_mail blockAccess
BrowserMatchNoCase ^EmailCollector blockAccess
BrowserMatchNoCase ^WhoWhere blockAccess
BrowserMatchNoCase ^Roverbot blockAccess
BrowserMatchNoCase ^ActiveAgent blockAccess
BrowserMatchNoCase ^EmailSiphon blockAccess
                                                                                 BrowserMatchNoCase ^CrownPeak-HttpAgent blockAccess
BrowserMatchNoCase ^$ blockAccess
Perlrequire /var/www/twiki/tools/mod_perl_startup.pl
PerlSwitches -T
ScriptAlias /twiki/bin "/var/www/twiki/bin"
Alias /twiki "/var/www/twiki"
<Directory "/var/www/twiki/bin">
    AllowOverride All
    Order Allow,Deny
    Allow from all
    Deny from env=blockAccess
     # 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). Cancel to register if you do not have one.'
    AuthType Basic

    # File to return on access control error (e.g. wrong password)
    # By convention this is the TWikiRegistration page, that allows users
    # to register with the TWiki. Apache requires this to be a *local* path.
    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 202.122.16.101
    Require user VictorPais
</FilesMatch>
<FilesMatch "(attach|edit|manage|rename|save|upload|view|.*auth).*">
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    PerlSendHeader On
    PerlOptions +ParseHeaders
</FilesMatch>

</Directory>
<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
    # It will also deliver HTML files as if they are text files
    AddType text/plain .html .htm .shtml .php .php3 .phtml .phtm .pl .py .cgi
</Directory>

# Spammers are known to attach their stuff and then move it to trash where is remains unnoticed.
# We prevent viewing any attachments directly from pub
<Directory "/var/www/twiki/pub/Trash">
        deny from all
</Directory>

# Security note: All other directories should be set so
# that they are *not* visible as URLs, so we set them as =deny from all=.
<Directory "/var/www/twiki/data">
    deny from all
</Directory>
<Directory "/var/www/twiki/templates">
    deny from all
</Directory>

<Directory "/var/www/twiki/lib">
    deny from all
</Directory>

<Directory "/var/www/twiki/locale">
    deny from all
</Directory>

<Directory "/var/www/twiki/tools">
    deny from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=*
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddDefaultCharset UTF-8
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully

******************************************************

/var/www/twiki/bin/LocalLib.cfg

use vars qw( $twikiLibPath $CPANBASE );

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

$twikiLibPath = '/var/www/twiki/lib';
 $localPerlLibPath = '/usr/lib/perl5';

*********************************

/var/www/twiki/bin/.htaccess

BrowserMatchNoCase ^$ anonymous_spider

# Now set default access rights.
Order Allow,Deny
Allow from all
Deny from env=anonymous_spider

# Use CGI & Perl to handle all files in 'bin' directory, i.e. run as scripts
# - this should remove the need to rename files to end in '.pl' etc,
# if your web hosting provider permits this.  Remove if using mod_perl.
SetHandler cgi-script

# Password file for TWiki users
#

# Authentication type (htpasswd file) (comment out this if you configure htpasswd / LDAP support)#AuthUserFile {DataDir}/.htpasswd
AuthUserFile /var/www/twiki/data/.htpasswd

AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
AuthType Basic
<Files ".*">
               SetHandler perl-script
               PerlHandler Apache::Registry
Options ExecCGI
               PerlSendHeader On
 </Files>

 <Files "upload">
               order allow,deny
               require valid-user
</Files>
ErrorDocument 401 {ScriptUrlPath}/view/TWiki/TWikiRegistration

# Turn off directory indexing in this and sub directories
Options -Indexes

<FilesMatch "[^/]*\.html$">
       SetHandler blabla
       allow from all
</FilesMatch>

# configure should be restricted to a small number of users
<FilesMatch "configure.*">
       require user "{VictorPais,Administrators}"
</FilesMatch>
<FilesMatch ".*">
       allow from all
</FilesMatch>

<FilesMatch ".*">
       allow from all
</FilesMatch>

<FilesMatch "register">
       deny from all
</FilesMatch>

************************************

/var/www/twiki/lib/LocalSite.cfg

$TWiki::cfg{DefaultUrlHost} = 'http://202.122.16.101';

# cgi-bin URL path for TWiki e.g. /twiki/bin
$TWiki::cfg{ScriptUrlPath} = '/twiki/bin';

# Attachments URL path e.g. /twiki/pub
$TWiki::cfg{PubUrlPath} = '/twiki/pub';

# Attachments store file path (not URL), must match /twiki/pub e.g.
# /usr/local/twiki/pub
$TWiki::cfg{PubDir} = '/var/www/twiki/pub';

# SECURITY NOTE: Directories =twiki/data= , =twiki/templates= and all 
# subdirectories should be set so that they are _not_ visible through
# URLs. (Alternatively, move the directories to a place where they are
# not visible, and set the paths here as appropriate)

# Template directory e.g. /usr/local/twiki/templates
$TWiki::cfg{TemplateDir} = '/var/www/twiki/templates';

# Topic files store (file path not URL) e.g. /usr/local/twiki/data
# TWiki will use this path to base other defaults, such as thelocation
# of password files.
$TWiki::cfg{DataDir} = '/var/www/twiki/data';
$TWiki::cfg{LogDir} = $TWiki::cfg{DataDir};

1;

*****************************************************

/var/www/twiki/lib/TWiki.cfg

my $defaultUrlHost = $cfg{DefaultUrlHost} || '';
my $dataDir = $cfg{DataDir} || '';
my $pubDir = $cfg{PubDir} || '';
my $logDir = $cfg{LogDir} || $dataDir;
my $OS = $cfg{OS} || '';
$cfg{DefaultUrlHost} = 'http://202.122.16.101';
$cfg{ScriptUrlPath} = '/twiki/bin';
$cfg{PubUrlPath} = '/twiki/pub';
$cfg{PubDir} = '/var/www/twiki/pub';
$cfg{TemplateDir} = '/var/www/twiki/templates';
$cfg{DataDir} = '/var/www/twiki/data';
$cfg{LocalesDir} = '/var/www/twiki/locales';
$cfg{ScriptSuffix} = '.cgi, .pl';
$cfg{Password} = '';
$cfg{UseClientSessions} = 1;
$cfg{Sessions}{Dir} = '/var/www/twiki/tmp';

$cfg{Sessions}{ExpireAfter} = 21600;
$cfg{Sessions}{IDsInURLs} = 0;
$cfg{Sessions}{UseIPMatching} = 1;
$cfg{Sessions}{MapIP2SID} = 0;
$cfg{LoginManager} = 'VictorPais';

$cfg{DefaultUserLogin} = 'guest';
$cfg{DefaultUserWikiName} = 'TWikiGuest';
$cfg{AdminUserWikiName} = 'TWikiAdminGroup';
$cfg{SuperAdminGroup} = 'TWikiAdminGroup';
$cfg{UsersTopicName} = 'TWikiUsers';
$cfg{MapUserToWikiName} = $TRUE;
$cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth';
$cfg{AuthRealm} ='VictorPais';
'Enter your TWiki.LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. !JohnSmith, unless you chose otherwise). Visit TWiki.TWikiRegistration if you do not have one.';
$cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';
$cfg{MinPasswordLength} = 1;
$cfg{Htpasswd}{FileName} = "/var/www/twiki/data/.htpasswd";
$cfg{Htpasswd}{Encoding} = 'crypt';
$cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$cfg{Register}{AllowLoginName} = $FALSE;
$cfg{Register}{HidePasswd} = $TRUE;
$cfg{Register}{NeedVerification} = $TRUE;
$cfg{SafeEnvPath} = '/bin:/usr/bin';
$cfg{DenyDotDotInclude} = $TRUE;
$cfg{INCLUDE}{AllowURLs} = $FALSE;
$cfg{AllowInlineScript} = $TRUE;
$cfg{UploadFilter} = qr/(?-xism:^(\.htaccess|.*\.(?i)(?:php[0-9s]?(\..*)?|[sp]htm[l]?(\..*)?|pl|py|cgi))$)/;
$cfg{NameFilter} = qr/[\s\*?~^\$@%`"'&;|<>\x00-\x1f]/;
$cfg{ForceUnsafeRegexes} = $FALSE;
$cfg{GetScriptUrlFromCgi} = $FALSE;
$cfg{RemovePortNumber}  = $FALSE;
$cfg{AntiSpam}{EmailPadding} = '';
$cfg{AntiSpam}{HideUserDetails} = $TRUE;
$cfg{AntiSpam}{RobotsAreWelcome} = $TRUE;
$cfg{Log}{view}     = $TRUE; # very frequent, every page view
# **BOOLEAN**
$cfg{Log}{search}   = $TRUE;
# **BOOLEAN**
$cfg{Log}{changes}  = $TRUE; # infrequent if you use WebChanges
# **BOOLEAN**
$cfg{Log}{rdiff}    = $TRUE; # whenever revisions are differenced
# **BOOLEAN**
$cfg{Log}{edit}     = $TRUE; # fairly frequent, every time a page is edited
# **BOOLEAN**
$cfg{Log}{save}     = $TRUE;
# **BOOLEAN**
$cfg{Log}{upload}   = $TRUE; # whenever a new attachment is created
# **BOOLEAN**
$cfg{Log}{attach}   = $TRUE;
# **BOOLEAN**
$cfg{Log}{rename}   = $TRUE; # when a topic or attachment is renamed
# **BOOLEAN**
$cfg{Log}{register} = $TRUE; # rare, when a new user registers

there is a lot of stuff here.

************************************

/var/www/twiki/pub/.htaccess

Allow from all
Options +ExecCGI +FollowSymLinks
php_flag engine off
AddType text/plain .html .htm .shtml .php .php3 .phtml .phtm .pl .py .cgi
*************************************************************
/var/www/twiki/.htaccess
Options -Indexes

************************************************

-- VictorPais - 19 Jul 2006

when I type http://202.122.16.101/twiki/bin/view/

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

[error] Can't locate VictorPais.pm in @INC (@INC contains: . /var/www/twiki/lib/CPAN/lib//arch/ /var/www/twiki/lib/CPAN/lib//5.8.5/i386-linux-thread-multi/ /var/www/twiki/lib/CPAN/lib//5.8.5/ /var/www/twiki/lib/CPAN/lib// /var/www/twiki/lib /var/www/twiki/bin /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /etc/httpd/ /etc/httpd/lib/perl) at (eval 19) line 2.\nBEGIN failed--compilation aborted at (eval 19) line 2.\n

-- VictorPais - 19 Jul 2006

I tried htpasswd -c command for user and passwd and I have got crypted line at .htpasswd I put the same login and passwd as I have in http://www.twiki.org/

-- VictorPais - 19 Jul 2006

it looks as if you have really screwed your configuration. You have modified TWiki.cfg (not recommended) and added

$cfg{LoginManager} = 'VictorPais';
which is at least one reason for your woes, though probably not the only one.

-- CrawfordCurrie - 21 Aug 2006

One month passed, closing question as unanswered.

-- PeterThoeny - 01 Oct 2006

I have had the same problem. I think another reason may be that the .htpasswd file does not have enough permissions - the server does not have permission to read the file, and thus can not find the user. Similar issues in CannotRunTheConfigure.

However, I am unsure how to solve this without creating security issues.

For readers who are concerned about the security implications of opening up permissions so widely, or who are having problems changing ownership, refer to ConfigureAuthentication.

-- EricWoods - 07 Feb 2007

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2007-02-07 - EricWoods
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.