ServerRoot "/usr/local/apache-build" Listen 81 LogLevel debug LoadModule perl_module modules/mod_perl.so User daemon Group daemon ServerAdmin xyz@xyz.com ServerName xyz.com DocumentRoot "/data/htdocs/twiki" RedirectMatch ^/$ /bin/view/ Options FollowSymLinks AllowOverride None Order deny,allow Deny from all # Autogenerated httpd.conf file for TWiki. # Generated at http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator # 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 ^Accoona blockAccess BrowserMatchNoCase ^ActiveAgent blockAccess BrowserMatchNoCase ^Attache blockAccess ... # Mod_perl preloading Perlrequire /data/htdocs/twiki/tools/mod_perl_startup.pl PerlSwitches -T # 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://my.co.uk/twiki/bin/view/... # The second parameter must point to the physical path on your disc. ScriptAlias /twiki/bin "/data/htdocs/twiki/bin" # The Alias defines a url that points to the root of the twiki installation. # It is used to access files in the pub directory (attachments etc) # It must come _after_ the ScriptAlias. Alias /twiki "/data/htdocs/twiki" # This specifies the options on the TWiki scripts directory. The ExecCGI # and SetHandler tell apache that it contains scripts. "Allow from all" # lets any IP address access this URL. AllowOverride All Order Allow,Deny Allow from all Deny from env=blockAccess Options ExecCGI FollowSymLinks SetHandler cgi-script # Password file for TWiki users AuthUserFile /data/htdocs/twiki/data/.htpasswd AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to re 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. SetHandler cgi-script Order Deny,Allow Allow from all # Enable mod_perl for the bin scripts listed SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlSendHeader On PerlOptions +ParseHeaders # 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 Options None AllowOverride None Order Allow,Deny Allow from all Deny from env=blockAccess # 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 # 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