daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Aug 28th, 2011 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # bin/.htaccess.txt
  2. #
  3. # Controls access to Foswiki scripts - to make Apache use it, rename this
  4. # file to '.htaccess' and REPLACE THE FOLLOWING STRINGS WHEREVER YOU SEE
  5. # THEM IN THIS FILE WITH PATHS SPECIFIC TO YOUR INSTALLATION.
  6. # Most required values have corresponding items in the  Path Settings section of
  7. # configure.   The following 4 strings must be updated:
  8. #
  9. # {DataDir}
  10. # {DefaultUrlHost}
  11. # {ScriptUrlPath}
  12. # {Administrators}
  13. #
  14. # Replace {DataDir} with the full path of the Topic files store (file path, not
  15. # URL) e.g. /usr/local/foswiki/data   Do not include a trailing slash.  Do not
  16. # include the { or } in the results.
  17. #
  18. # Example:   "Change all"  {DataDir} /var/www/foswiki/data
  19. #   AuthUserFile {DataDir}/.htpasswd      becomes
  20. #   AuthUserFile /var/www/foswiki/data/.htpasswd
  21. #
  22. # Replace {DefaultUrlHost} with the root of all Foswiki URLs e.g.
  23. # http://myhost.com:123.  This is only used for htdigest authentication and
  24. # can be ignored in most installations.  Do not include a trailing slash
  25. #
  26. # Replace {ScriptUrlPath} with the 'cgi-bin' part of URLs used
  27. # to access the Foswiki bin  directory e.g. '/foswiki/cgi-bin'
  28. #
  29. # Note:  The combined {DefaultUrlHost}{ScriptUrlPath} will be used as the URL prefix:
  30. # to access the foswiki scripts.  For example, to access the /view script:
  31. #    http://myhost.com:123/foswiki/cgi-bin/view
  32. #    {DefaultUrlHost     }{ScriptUrlPath }/view
  33. #
  34. # Replace {Administrators} with a space-separated list of the login
  35. # name(s) of the person(s) allowed to run the configure script
  36. # e.g. admin configure root superhero
  37. # Note that these users must typically be added to .htpasswd manually if
  38. # Foswiki is not operational enough to register the users.
  39. #
  40. # When this file has been completely tailored, complete your configuration at:
  41. # {DefaultUrlHost}{ScriptUrlPath}/configure
  42.  
  43. # We set an environment variable called anonymous_spider
  44. # Setting a BrowserMatchNoCase to ^$ is important. It prevents Foswiki from
  45. # including its own topics as URLs and also prevents other Foswikis from
  46. # doing the same. This is important to prevent the most obvious
  47. # Denial of Service attacks.
  48. # You can expand this by adding more BrowserMatchNoCase statements to
  49. # block evil browser agents trying the impossible task of mirroring a Foswiki
  50. # Example:
  51. # BrowserMatchNoCase ^SiteSucker anonymous_spider
  52. BrowserMatchNoCase ^$ anonymous_spider
  53.  
  54. # Now set default access rights.
  55. Order Allow,Deny
  56. Allow from all
  57. Deny from env=anonymous_spider
  58.  
  59. # Use CGI & Perl to handle all files in 'bin' directory, i.e. run as scripts -
  60. # this should remove the need to rename files to end in '.pl' etc, if your web
  61. # hosting provider permits this.  Remove if using mod_perl.  Look at
  62. # http://foswiki.org/Extensions/FastCGIEngineContrib to get info about FastCGI
  63. # support.
  64. SetHandler cgi-script
  65.  
  66. # Password file for Foswiki users
  67. #
  68.  
  69. # Authentication type (htpasswd file) (comment out this if you configure htpasswd / LDAP support)
  70. AuthUserFile {DataDir}/.htpasswd
  71. 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.'
  72. AuthType Basic
  73.  
  74. #for htdigest password suport uncomment the following
  75. #AuthDigestDomain / {DefaultUrlHost}
  76. #AuthDigestFile {DataDir}/.htdigest
  77. #BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
  78. #AuthDigestProvider file
  79. #AuthUserFile {DataDir}/.htpasswd
  80. # For "Digest" authentication to work properly, this string must match
  81. # the value of configuration variable $authRealm
  82. #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.'
  83. #AuthType Digest
  84.  
  85. #for LDAP password support uncomment the following (and fix up the paths)
  86. #AuthLDAPURL ldap://yourldapserver/dc=yourldapserver,dc=com?uid?sub?(objectClass=posixAccount)
  87. #AuthLDAPGroupAttribute memberUid
  88. #AuthLDAPGroupAttributeIsDN off
  89. #<Limit GET POST PUT>
  90. #    require group cn=mygroup,ou=groups,dc=yourldapserver,dc=com
  91. #</Limit>
  92. #AuthName ByPassword
  93. #AuthType Basic
  94.  
  95. # File to return on access control error (e.g. wrong password)
  96. # By convention this is the UserRegistration page, that allows users
  97. # to register with the Foswiki. Apache requires this to be a *local* path.
  98. # Comment this out if you setup Foswiki to completely deny access to WikiGuest
  99. # in all webs or change the path to a static html page.
  100. ErrorDocument 401 {ScriptUrlPath}/view/System/UserRegistration
  101. # Alternatively if your users are all known to be registered you may want
  102. # to redirect them to the ResetPassword page.
  103. # ErrorDocument 401 {ScriptUrlPath}/view/System/ResetPassword
  104.  
  105. # Set options for excuting CGI and allow symlinks for e.g. viewauth
  106. # This also unsets any options allowing directory indexing etc.
  107. Options ExecCGI FollowSymLinks
  108.  
  109. # Limit access to configure to specific IP addresses and or users.
  110. # Make sure configure is not open to the general public.
  111. # IP addresses are entered space delimited, and can wildcarded by
  112. # omitting octets from the end,  ie,  Allow from 127 192.168
  113. # The configure script is designed for administrators only.
  114. # The script itself and the information it reveals can be abused by
  115. # attackers if not properly protected against public access.
  116. #  - ErrorDocument should point to apache default - redirecting to a Foswiki
  117. #    script may not be functional yet.
  118. <FilesMatch "configure.*">
  119.         SetHandler cgi-script
  120.         Order Deny,Allow
  121.         Deny from all
  122.         Allow from 127.0.0.1 192.168.1.10 89.38.10.218
  123.         Require user Marian
  124.         Satisfy Any
  125.         ErrorDocument 401 default
  126. </FilesMatch>
  127.  
  128. # These are scripts that might change content. The regular expression uses ".*"
  129. # at the end so it matches the scripts even if you had to add a .cgi or .pl
  130. # extension. If you want to require login for any other scripts, modify the
  131. # regular expression below as appropriate.
  132.  
  133. # NB. The resetpasswd & passwd scripts are used to reset and change passwords.
  134. # They do their own validation of the user and therefore
  135. # should not use "require valid-user"
  136.  
  137. # When using Apache type login the following defines the Foswiki scripts
  138. # that makes Apache ask the browser to authenticate. It is correct that
  139. # scripts such as view, resetpasswd & passwd are not authenticated.
  140. # (un-comment to activate)
  141. #<FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|rest|.*auth).*">
  142. #       require valid-user
  143. #</FilesMatch>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top