When I want to open the config file of Foswiki I get a error message
http://192.168.0.242/bin/configure
The Foswiki is in the path /var/www/Foswiki-1.0.9/
Sorry for the bad formatted text but I'm newbie and it's possible that I can use Foswiki this week so It would be nice to get helpful comments
Debian Apache2 installed IP-v4: 192.168.0.242
Windows XP installed IP-v4: 192.168.0.249
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
webmaster@Foswiki and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log. Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server at 192.168.0.242 Port 80
That's the /etc/apache2/apache2.conf
This I had add to the conf:
apache2.conf
# Autogenerated httpd.conf file for Foswiki. # Generated at
http://foswiki.org/Support/ApacheConfigGenerator?vhost=;port=;dir=/var/www/Foswiki-1.0.9;symlink=;pathurl=/fo$
# For Foswiki version 1.0.0
# The Alias defines a url that points to the root of the Foswiki installation. # The first parameter will be part of the URL to your installation e.g. #
http://my.co.uk/foswiki/bin/view/... # The second parameter must point to the physical path on your disc.
/foswiki/bin "/var/www/Foswiki-1.0.9/bin"
# The following Alias is used to access files in the pub directory (attachments etc) # It must come
after the
ScriptAlias? . # If short URLs are enabled, and any other local directories or files need to be accessed directly, #they # must also be specified in an Alias statement, and must not conflict with a web name.
#Alias /foswiki/pub "/var/www/Foswiki-1.0.9/pub" #Alias /foswiki/robots.txt "/var/www/Foswiki-1.0.9/robots.txt"
# Rewriting is required for Short URLs, and Attachment redirecting to viewfile
on
"/var/log/apache/rewrite.log"
0
# short urls #Alias /foswiki "/var/www/Foswiki-1.0.9/bin/view"
^/+foswiki/+bin/+view/+(.*) /foswiki/$1 [L,NE,R]
^/+foswiki/+bin/+view$ /foswiki/ [L,NE,R]
# This enables access to the documents in the Foswiki root directory # # Order Allow,Deny # Allow from all # Deny from env=blockAccess #
# This specifies the options on the Foswiki scripts directory. The
ExecCGI? # and
SetHandler? tell apache that it contains scripts. "Allow from all" # lets any IP address access this URL. # Note: If you use SELinux, you also have to "Allow httpd cgi support" in your SELinux policies
# #
AllowOverride? None # Order Allow,Deny # Allow from all # Deny from env=blockAccess # # Options +ExecCGI +FollowSymLinks #
SetHandler? cgi-script # # Password file for Foswiki users #
AuthUserFile? /var/www/Foswiki-1.0.9/data/.htpasswd #
# This specifies the options on the Foswiki scripts directory. The
ExecCGI? # and
SetHandler? tell apache that it contains scripts. "Allow from all" # lets any IP address access this URL. # Note: If you use SELinux, you also have to "Allow httpd cgi support" in your SELinux policies
# #
AllowOverride? None # Order Allow,Deny # Allow from all # Deny from env=blockAccess # # Options +ExecCGI +FollowSymLinks #
SetHandler? cgi-script # # Password file for Foswiki users #
AuthUserFile? /var/www/Foswiki-1.0.9/data/.htpasswd #
AuthName? 'Enter your
WikiName? : (First name and last name, no space, no dots, capitalized, e.g. #JohnSmith). Cancel to reg$ #
AuthType? Basic
# Limit access to configure to specific IP address(es) or user(s). # Make sure configure is not open to the general public. # It exposes system details that can help attackers. # cf.
http://foswiki.org/Support/ProtectingYourConfiguration for details. # #
SetHandler? cgi-script # Order Deny,Allow # Deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # Satisfy Any # # #
# 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 Foswiki 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 # # Options None # Options +FollowSymLinks #
AllowOverride? None # Order Allow,Deny # Allow from all # Deny from env=blockAccess #
ErrorDocument? 404 /foswiki/bin/viewfile
# Disable execution 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 Foswiki 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 # # #
ExpiresActive? on #
ExpiresDefault? "access plus 11 days" # # # # Serve pre-compressed versions of .js and .css files, if they exist # Some browsers do not handle this correctly, which is why it is disabled by default # #
RewriteEngine? on #
RewriteCond? %{HTTP:Accept-encoding} gzip #
RewriteCond? %{REQUEST_FILENAME}.gz -f #
RewriteRule? ^(.*)$ %{REQUEST_URI}.gz [L,QSA] # # #
RewriteEngine? on #
RewriteCond? %{HTTP:Accept-encoding} gzip #
RewriteCond? %{REQUEST_FILENAME}.gz -f #
RewriteRule? ^([^?]*)\?(.*)$ $1.gz?$2 [L] # # #
AddEncoding? x-gzip .gz #
AddType? application/x-javascript .gz # # #
AddEncoding? x-gzip .gz #
AddType? text/css .gz #
#
# Security note: All other directories should be set so # that they are
not visible as URLs, so we set them as
deny from all
. # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # # deny from all # Allow from localhost 192.168.0.242 192.168.0.249 # # # We set an environment variable called blockAccess. # # 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 blockAccess #
BrowserMatchNoCase? ^$ blockAccess
^$ blockAccess
That's the apache2.conf
Now I have a foswiki.conf
/etc/apache2/conf.d/foswiki.conf
foswiki.conf
# Autogenerated httpd.conf file for Foswiki. # Generated at
http://foswiki.org/Support/ApacheConfigGenerator?vhost=Foswiki;port=;dir=/var/www/Foswiki-1.0.9;symlink=on;pa$
# For Foswiki version 1.0.0
ServerAdmin? webmaster@Foswiki DocumentRoot? /var/www/Foswiki-1.0.9
ServerName? Foswiki
ServerAlias? www.Foswiki # Optional. Add to list of redirect hosts in bin/configure
# The Alias defines a url that points to the root of the Foswiki installation. # The first parameter will be part of the URL to your installation e.g. #
http://my.co.uk/foswiki/bin/view/... # The second parameter must point to the physical path on your disc.
/foswiki/bin/configure "/var/www/Foswiki-1.0.9/bin/configure"
ScriptAlias? /foswiki/bin "/var/www/Foswiki-1.0.9/bin"
# The following Alias is used to access files in the pub directory (attachments etc) # It must come
after the
ScriptAlias? . # If short URLs are enabled, and any other local directories or files need to be accessed directly, they # must also be specified in an Alias statement, and must not conflict with a web name.
Alias /foswiki/pub "/var/www/Foswiki-1.0.9/pub" Alias /foswiki/robots.txt "/var/www/Foswiki-1.0.9/robots.txt"
# Rewriting is required for Short URLs, and Attachment redirecting to viewfile
RewriteEngine? on
"/var/log/apache/rewrite.log"
0
# short urls Alias /foswiki "/var/www/Foswiki-1.0.9/bin/view"
RewriteRule? ^/+foswiki/+bin/+view/+(.*) /foswiki/$1 [L,NE,R]
RewriteRule? ^/+foswiki/+bin/+view$ /foswiki/ [L,NE,R]
# This enables access to the documents in the Foswiki root directory Order Allow,Deny Allow from all Deny from env=blockAccess
# This specifies the options on the Foswiki scripts directory. The
ExecCGI? # and
SetHandler? tell apache that it contains scripts. "Allow from all" # lets any IP address access this URL. # Note: If you use SELinux, you also have to "Allow httpd cgi support" in your SELinux policies
AllowOverride? None Order Allow,Deny Allow from all Deny from env=blockAccess
Options +ExecCGI +FollowSymLinks
SetHandler? cgi-script
# Password file for Foswiki users
AuthUserFile? /var/www/Foswiki-1.0.9/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
# Limit access to configure to specific IP address(es) or user(s). # Make sure configure is not open to the general public. # It exposes system details that can help attackers. # cf.
http://foswiki.org/Support/ProtectingYourConfiguration for details.
SetHandler? cgi-script Order Deny,Allow Deny from all Allow from root www-data 192.168.0.242 192.168.0.249
Satisfy Any
# 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 Foswiki 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 Options None Options +FollowSymLinks
AllowOverride? None Order Allow,Deny Allow from all Deny from env=blockAccess
ErrorDocument? 404 /foswiki/bin/viewfile
# Disable execution 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 Foswiki 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 # # #
ExpiresActive? on #
ExpiresDefault? "access plus 11 days" # # # # Serve pre-compressed versions of .js and .css files, if they exist # Some browsers do not handle this correctly, which is why it is disabled by default # #
RewriteEngine? on #
RewriteCond? %{HTTP:Accept-encoding} gzip #
RewriteCond? %{REQUEST_FILENAME}.gz -f #
RewriteRule? ^(.*)$ %{REQUEST_URI}.gz [L,QSA] # # #
RewriteEngine? on #
RewriteCond? %{HTTP:Accept-encoding} gzip #
RewriteCond? %{REQUEST_FILENAME}.gz -f #
RewriteRule? ^([^?]*)\?(.*)$ $1.gz?$2 [L] # # #
AddEncoding? x-gzip .gz #
AddType? application/x-javascript .gz # # #
AddEncoding? x-gzip .gz #
AddType? text/css .gz # #
# Security note: All other directories should be set so # that they are
not visible as URLs, so we set them as
deny from all
. # # deny from all #
# # deny from all # # # # deny from all # # # # deny from all # # # # deny from all # # # # deny from all #
# We set an environment variable called blockAccess. # # 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 blockAccess #
BrowserMatchNoCase? ^$ blockAccess
^$ blockAccess
#
So that's my apache2.conf and my foswiki.conf
Here is the error.log of apache2
error.log apache2
/var/log/apache2/error.log
[Wed Mar 24 08:24:13 2010] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 24 08:24:26 2010] [error] [client 192.168.0.249] (8)Exec format error: exec of '/var/www/Foswiki-1.0.9/bin/configure' failed, referer:
http://192.168.0.242/
[Wed Mar 24 08:24:26 2010] [error] [client 192.168.0.249] Premature end of script headers: configure, referer:
http://192.168.0.242/
My problem is I don't know whats the problem is.
Of course I have the error.log but there aren't information for me.
It would be nice when anyone could help me...
Greetz Niklas