SID-02270: Can't Run the configure, 404 error.
| Status: |
Answered |
TWiki version: |
6.0.2 |
Perl version: |
5.22.1 |
| Category: |
CategoryInstallation |
Server OS: |
Linux 4.4.0-42-generic ubuntu |
Last update: |
5 years ago |
Hey guys,
as the title says, i have a problem with getting my twiki running. i followed the setps to setup my twiki server
https://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide but when i have to run my configure it leads me to the 404 Error (no page found). I searched on the web and found some people with almost the same problem but their solution wasn't working for me (cant remember where because it was before my holidays).
I have:
Twiki 6.0.2
Ubuntu 16.4 LTS
Apache 2.4.18
mysql 5.7.16
(i guess its all the newest version).
Twiki is located in /var/www/twiki and i used the twiki config generator to create the config.
This is the Locallib.Cfg
- I took the liberty to hide the file since it isn't relevant for the cause. As a general hint, it is better to attach config files to a support question than to copy it. -- HaraldJoerg
# TWiki Enterprise Collaboration Platform, https://TWiki.org/
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# LocalLib.cfg: local path settings for TWiki
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/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/";
# ------------++ Extra path components to include in @INC
# OPTIONAL:
# If you need to use perl modules that are not installed in the standard
# directories (e.g. you have downloaded extra modules for use with plugins)
# then you can add the absolute paths to those modules below. You can list
# as many directories as you want, separated by commas.
# @localPerlLibPath = ( '/path/to/dir' );
# http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=3 has good advice
# on installing CPAN modules without superuser privileges.
1; # Required for successful module loading
and the twiki.conf located at /etc/apache2/conf-available/twiki.conf
- I took the liberty to hide the file (again) because of its length (and TWiki trying to interpret it, making it hard to read) -- HaraldJoerg
# Autogenerated httpd.conf file for TWiki.
# Generated at https://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator
# IMPORTANT NOTE: Make sure to enable mod_cgi in the primary apache configuration file.
# 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
</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/do/view/...
# The second parameter must point to the physical path on your disc.
ScriptAlias /do "/var/www/twiki"
# The Alias defines a url that points to the twiki pub directory, which
# is the root of file attachments.
# Secure file attachments by using ScriptAlias with viewfile script.
Alias /pub/TWiki "/var/www/twiki/pub/TWiki"
Alias /pub/Sandbox "/var/www/twiki/pub/Sandbox"
ScriptAlias /pub "/var/www/twiki/bin/viewfile"
# Block access to typical spam related attachments
# Except the TWiki directory which is read only and does have attached html files.
SetEnvIf Request_URI "/pub/.*\.[hH][tT][mM][lL]?$" blockAccess
SetEnvIf Request_URI "/pub/TWiki/.*\.[hH][tT][mM][lL]?$" !blockAccess
# This specifies the options on the TWiki scripts directory. The ExecCGI
# and SetHandler tell apache that it contains scripts. "Require all granted"
# lets any IP address access this URL.
<Directory "/var/www/twiki/bin">
AllowOverride None
Require all granted
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
</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
Require all granted
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>
# 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>
I hope someone can help me
Kind Regards
--
Ralf Mueller - 2016-10-26
Discussion and Answer
A hint to the problem should be in Apache's error log, usually at
/var/log/apache2/error.log where
you should find a line containing 1) the URL and 2) the file path Apache was trying to deliver the URL.
You did not provide the URL you tried to reach the configure script, but with your configuration file, it should be available from
-
http://your.server/do/configure
Another check would be to look whether there's a link in
/etc/apache2/conf-enabled, linking to your TWiki config file.
--
Harald Jörg - 2016-10-26
Thanks Harald for your help.
firstly, there wasnt a link to the twiki.conf so i made one after that i tried again *
http://Wikiblabla/do/configure and still 404 Error. Checked the Error log and it said the path
/var/www/twiki/configure could not be found. The scripts are in the bin folder just like configure so i changed twiki.conf path from
var/www/twiki to
var/www/twiki/bin; and boom, it worked.
Thanks again for your help now i can continue working on my wiki.
--
Ralf Mueller - 2016-10-27
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.