This question about Installation of Foswiki: Answered

Invalid command '/wiki/bin/configure', perhaps misspelled or defined by a module not included in the server configuration

Hi all! It's been years since I've last worked with the Foswiki installer. I'm delighted it's still going so strong.

I'm trying to install Foswiki 2.0.3 from scratch on a hosted web server ( Dreamhost, running Apache 2.2 on Linux). That means no access to sudo nor Apache config files, but I can work with .htaccess files. I'm diligently following the installation guide but I got stuck in Step 5 when the browser shows an "Internal Server Error". The Apache error.log shows the following:
[Fri Dec 18 05:46:55 2015] [alert] [client 91.115.18.64] /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/bin/.htaccess: Invalid command 'http://fingerfans.dreamhosters.com/wiki/bin/configure', perhaps misspelled or defined by a module not included in the server configuration
[Fri Dec 18 05:46:55 2015] [error] [client 91.115.18.64] File does not exist: /home/torbengb/domains/fingerfans.dreamhosters.com/root/internal_error.html

The URL in the above error message is as I expect it to be; the domain is correct and Foswiki is installed in the /wiki/ directory. I've checked that all the required .htaccess files are created as instructed, and all files everywhere appear to exist and have the right owner and permission. I've also checked that the shebang line ("/usr/bin/perl") matches the output of which perl ("#! /usr/bin/env perl"), and that my /bin/LocalLib.cfg exists and is correct:
$foswikiLibPath = '/home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/lib';

I'm running out of ideas, but there has to be a mistake somewhere. What more can I check?

-- TorbenGB - 18 Dec 2015

I think that's actually saying that there is an error in the bin/.htaccess file. Could you paste the contents of that file here in a verbatim block? Thanks

-- GeorgeClark - 18 Dec 2015

Yes George, here's the complete content of that file. You can see I copied the template bin-htaccess.txt and just search/replaced the strings:
# Sample bin/.htaccess file. If you require .htaccess files for your apache
# configuration, tailor this file using the below instructions.
# 
# Apache 2.4 users. This file is built for Apache 2.2. If you use Apache
# 2.4, you must enable mod_access_compat for backwards compatiblility
#
############### TAILORING INSTRUCTIONS #################
#
# This file controls access to Foswiki scripts - to make Apache use it, rename this
# file to 'bin/.htaccess' and REPLACE THE FOLLOWING STRINGS WHEREVER YOU SEE
# THEM IN THIS FILE WITH PATHS SPECIFIC TO YOUR INSTALLATION.
# Most required values have corresponding items in the Path Settings section of
# configure. The following 5 strings must be updated:
#
# /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/data
# /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/working
# http://fingerfans.dreamhosters.com
# /bin
#
# Replace /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/data with the full path of the Topic files store (file path, not
# URL) e.g. /usr/local/foswiki/data Do not include a trailing slash. Do not
# include the { or } in the results.
#
# Example: "Change all" /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/data /var/www/foswiki/data
# AuthUserFile {DataDir}/.htpasswd becomes
# AuthUserFile /var/www/foswiki/data/.htpasswd
#
# Replace /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/working with the full path of a workarea directory (file path,
# no URL) e.g. /usr/local/foswiki/working Do not include a trailing slash.
# This directory MUST NOT BE ACCESSIBLE VIA THE WEB!
#
# Replace http://fingerfans.dreamhosters.com with the root of all Foswiki URLs e.g.
# http://myhost.com:123. This is only used for htdigest authentication and
# can be ignored in most installations. Do not include a trailing slash
#
# Replace /bin with the 'cgi-bin' part of URLs used
# to access the Foswiki bin directory e.g. '/foswiki/cgi-bin'
#
# Note: The combined {DefaultUrlHost}{ScriptUrlPath} will be used as the URL prefix:
# to access the foswiki scripts. For example, to access the /view script:
# http://myhost.com:123/foswiki/cgi-bin/view
# {DefaultUrlHost }{ScriptUrlPath }/view
#
#
# When this file has been completely tailored, complete your configuration at:
http://fingerfans.dreamhosters.com/wiki/bin/configure
##################################
# We set an environment variable called anonymous_spider
# Setting a BrowserMatchNoCase to ^$ is important. It prevents Foswiki from
# including its own topics as URLs and also prevents other Foswikis 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 Foswiki
# Example:
# BrowserMatchNoCase ^SiteSucker anonymous_spider
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. Look at
# http://foswiki.org/Extensions/FastCGIEngineContrib to get info about FastCGI
# support.
SetHandler cgi-script
# Password file for Foswiki users
#
# Authentication type (htpasswd file) Uncomment this block if you are using Apache controlled login.
AuthUserFile /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/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
#for htdigest password suport uncomment the following
#AuthDigestDomain / http://fingerfans.dreamhosters.com/wiki
#AuthDigestFile /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/data/.htdigest
#BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
#AuthDigestProvider file
#AuthUserFile /home/torbengb/domains/fingerfans.dreamhosters.com/root/wiki/data/.htpasswd
# For "Digest" authentication to work properly, this string must match
# the value of configuration variable $authRealm
#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 Digest
#for LDAP password support uncomment the following (and fix up the paths)
#AuthLDAPURL ldap://yourldapserver/dc=yourldapserver,dc=com?uid?sub?(objectClass=posixAccount)
#AuthLDAPGroupAttribute memberUid
#AuthLDAPGroupAttributeIsDN off
#<Limit GET POST PUT>
# require group cn=mygroup,ou=groups,dc=yourldapserver,dc=com
#</Limit>
#AuthName ByPassword
#AuthType Basic
# File to return on access control error (e.g. wrong password)
# By convention this is the UserRegistration page, that allows users
# to register with the Foswiki. Apache requires this to be a *local* path.
# Comment this out if you setup Foswiki to completely deny access to WikiGuest
# in all webs or change the path to a static html page.
# Alternatively if your users are all known to be registered you may want
# to redirect them to the ResetPassword page. Only uncomment one of these
# lines:
ErrorDocument 401 /bin/view/System/UserRegistration
# ErrorDocument 401 /bin/view/System/ResetPassword
# Set options for excuting CGI and allow symlinks for e.g. viewauth
# This also unsets any options allowing directory indexing etc.
Options ExecCGI FollowSymLinks
# These are scripts that might change content. The regular expression uses ".*"
# at the end so it matches the scripts even if you had to add a .cgi or .pl
# extension. If you want to require login for any other scripts, modify the
# regular expression below as appropriate.
# NB. The resetpasswd & passwd scripts are used to reset and change passwords.
# They do their own validation of the user and therefore
# should not use "require valid-user"
# When using Apache type login the following defines the Foswiki scripts
# that makes Apache ask the browser to authenticate. It is correct that
# scripts such as view, resetpasswd, rest, jsonrpc & passwd are not authenticated.
# (un-comment to activate)
#<FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|.*auth).*">
# require valid-user
#</FilesMatch>

-- TorbenGB - 18 Dec 2015

Following your suspicion, I went ahead and re-created the bin/.htaccess file based on the original template, and now it works! I marked this topic as answered.

I might have made two mistakes:

- the scripturlpath was /bin and now I used /wiki/bin instead. - the search&replace feature was set to "match whole word only" and I now turned that off.

-- TorbenGB - 18 Dec 2015
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version Foswiki 2.0.3
Status Answered
Related Topics
Topic revision: r3 - 18 Dec 2015, TorbenGB
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy