Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 KB | None | 0 0
  1. This is a minimal example config
  2. # See /usr/share/doc/lighttpd
  3. # and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions
  4.  
  5. server.port = 80
  6. server.username = "http"
  7. server.groupname = "http"
  8. server.document-root = "/srv/http"
  9. server.errorlog = "/var/log/lighttpd/error.log"
  10. dir-listing.activate = "enable"
  11. index-file.names = ( "index.html" )
  12. mimetype.assign = (
  13. ".html" => "text/html",
  14. ".txt" => "text/plain",
  15. ".css" => "text/css",
  16. ".js" => "application/x-javascript",
  17. ".jpg" => "image/jpeg",
  18. ".jpeg" => "image/jpeg",
  19. ".gif" => "image/gif",
  20. ".png" => "image/png",
  21. "" => "application/octet-stream"
  22. )
  23. include "conf.d/fastcgi.conf"
  24.  
  25. $HTTP["host"] == "www.lorwiki.org.ru" {
  26. server.document-root = "/srv/http/wiki"
  27. server.error-handler-404 = "/404.php"
  28. url.rewrite-if-not-file = (
  29. "^/wiki/(mw-)?config/?" => "$0",
  30. "^/wiki/([^?]*)(?:\?(.*))?" => "/index.php?title=$1&$2",
  31. "^/wiki/([^?]*)" => "/index.php?title=$1",
  32. "^/wiki$" => "/index.php", # to avoid 404 when the user types /wiki instead of /wiki/
  33. )
  34. }
  35. $HTTP["host"] == "lorwiki.org.ru" {
  36. server.document-root = "/srv/http/wiki"
  37. server.error-handler-404 = "/404.php"
  38. url.rewrite-if-not-file = (
  39. "^/wiki/(mw-)?config/?" => "$0",
  40. "^/wiki/([^?]*)(?:\?(.*))?" => "/index.php?title=$1&$2",
  41. "^/wiki/([^?]*)" => "/index.php?title=$1",
  42. "^/wiki$" => "/index.php", # to avoid 404 when the user types /wiki instead of /wiki/
  43. )
  44. }
  45. $SERVER["socket"] == ":443" {
  46. ssl.engine = "enable"
  47. ssl.pemfile = "/etc/letsencrypt/live/lorwiki.org.ru/combined.pem"
  48. ssl.ca-file = "/etc/letsencrypt/live/lorwiki.org.ru/chain.pem"
  49. }
  50.  
  51.  
  52.  
  53. php <?php
  54. # This file was automatically generated by the MediaWiki 1.31.0-alpha
  55. # installer. If you make manual changes, please keep track in case you
  56. # need to recreate them later.
  57. #
  58. # See includes/DefaultSettings.php for all configurable settings
  59. # and their default values, but don't forget to make changes in _this_
  60. # file, not there.
  61. #
  62. # Further documentation for configuration settings may be found at:
  63. # https://www.mediawiki.org/wiki/Manual:Configuration_settings
  64.  
  65. # Protect against web entry
  66. if ( !defined( 'MEDIAWIKI' ) ) {
  67. exit;
  68. }
  69.  
  70. ## Uncomment this to disable output compression
  71. # $wgDisableOutputCompression = true;
  72.  
  73. $wgSitename = "LORWiki";
  74.  
  75. ## The URL base path to the directory containing the wiki;
  76. ## defaults for all runtime URL paths are based off of this.
  77. ## For more information on customizing the URLs
  78. ## (like /w/index.php/Page_title to /wiki/Page_title) please see:
  79. ## https://www.mediawiki.org/wiki/Manual:Short_URL
  80. $wgScriptPath = "";
  81.  
  82. // The URL base path to the directory containing the wiki;
  83. // defaults for all runtime URL paths are based off of this.
  84. // For more information on customizing the URLs
  85. // (like /w/index.php/Page_title to /wiki/Page_title) please see:
  86. // https://www.mediawiki.org/wiki/Manual:Short_URL
  87. $wgScript = "$wgScriptPath/index.php";
  88. $wgRedirectScript = "$wgScriptPath/redirect.php";
  89. $wgArticlePath = "$wgScriptPath/$1";
  90.  
  91. ## The protocol and server name to use in fully-qualified URLs
  92. $wgServer = "http://lorwiki.org.ru/";
  93.  
  94. ## The URL path to static resources (images, scripts, etc.)
  95. $wgResourceBasePath = $wgScriptPath;
  96.  
  97. ## The URL path to the logo. Make sure you change this from the
  98. ## or else you'll overwrite your logo when you upgrade!
  99. $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
  100.  
  101. ## UPO means: this is also a user preference option
  102.  
  103. $wgEnableEmail = false;
  104. $wgEnableUserEmail = true; # UPO
  105.  
  106. $wgEmergencyContact = "apache@92.53.90.130";
  107. $wgPasswordSender = "apache@92.53.90.130";
  108.  
  109. $wgEnotifUserTalk = false; # UPO
  110. $wgEnotifWatchlist = false; # UPO
  111. $wgEmailAuthentication = true;
  112.  
  113. ## Database settings
  114. $wgDBtype = "mysql";
  115. $wgDBserver = "localhost";
  116. $wgDBname = "lorwikidb";
  117. $wgDBuser = "root";
  118. $wgDBpassword = "";
  119.  
  120. # MySQL specific settings
  121. $wgDBprefix = "";
  122.  
  123. # MySQL table options to use during installation or update
  124. $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";
  125.  
  126. # Experimental charset support for MySQL 5.0.
  127. $wgDBmysql5 = false;
  128.  
  129. ## Shared memory settings
  130.  
  131. ## To enable image uploads, make sure the 'images' directory
  132. ## is writable, then set this to true:
  133. $wgEnableUploads = true;
  134. #$wgUseImageMagick = true;
  135. #$wgImageMagickConvertCommand = "/usr/bin/convert";
  136.  
  137. # InstantCommons allows wiki to use images from https://commons.wikimedia.org
  138. $wgUseInstantCommons = false;
  139.  
  140. # Periodically send a pingback to https://www.mediawiki.org/ with basic
  141. #data
  142. # about this MediaWiki instance. The Wikimedia Foundation shares this
  143. # with MediaWiki developers to help guide future development efforts.
  144. #$wgPingback = true;
  145.  
  146. ## If you use ImageMagick (or any other shell command) on a
  147. ## Linux server, this will need to be set to the name of an
  148. ## available UTF-8 locale
  149. $wgShellLocale = "en_US.utf8";
  150.  
  151. ## Set $wgCacheDirectory to a writable directory on the web server
  152. ## to make your wiki go slightly faster. The directory should not
  153. ## be publically accessible from the web.
  154. $wgCacheDirectory = "$IP/cache";
  155.  
  156. # Site language code, should be one of the list in
  157. #./languages/data/Names.php
  158. $wgLanguageCode = "ru";
  159. $wgSecretKey = "bbfca79c3c8efcfa2b1aa15195e00c7888360c0038323ca61537c76a7ba562a4";
  160.  
  161. # Changing this will log out all existing sessions.
  162. $wgAuthenticationTokenVersion = "1";
  163.  
  164. # Site upgrade key. Must be set to a string (default provided) to turn n the
  165. # web installer while LocalSettings.php is in place
  166. $wgUpgradeKey = "ed3f4d913eb8dc6a";
  167.  
  168. ## For attaching licensing metadata to pages, and displaying an
  169. ## appropriate copyright notice / icon. GNU Free Documentation
  170. ## License and Creative Commons licenses are supported so far.
  171. $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
  172. $wgRightsUrl = "";
  173. $wgRightsText = "Creative Commons Attribution-ShareAlike 4.0 Unported";
  174. $wgRightsIcon = "";
  175.  
  176. # Path to the GNU diff3 utility. Used for conflict resolution.
  177. $wgDiff3 = "/usr/bin/diff3";
  178. wfLoadSkin( 'MonoBook' );
  179.  
  180. ## Default skin: you can change the default skin. Use the internal symbolic
  181. ## names, ie 'vector', 'monobook':
  182. $wgDefaultSkin = "monobook";
  183.  
  184. # End of automatically generated settings.
  185. # Add more configuration options below.
  186.  
  187. wfLoadExtension( 'SyntaxHighlight_GeSHi' );
  188. wfLoadExtension( 'DiscussionThreading' );
  189.  
  190. $wgFileExtensions[] = 'svg';
  191. ///$wgDebugLogFile = "/srv/http/wiki/debug.log";
  192.  
  193. // Субстраницы в майн
  194. $wgNamespacesWithSubpages[NS_MAIN] = true;
  195.  
  196. // Кастомные пространства имён
  197. // Define constants for my additional namespaces.
  198. define("NS_Portal", 3000); // This MUST be even.
  199. define("NS_Portal_TALK", 3001); // This MUST be the following odd integer.
  200.  
  201. // Add namespaces.
  202. $wgExtraNamespaces[NS_Portal] = "Портал";
  203. $wgExtraNamespaces[NS_Portal_TALK] = "Обсуждение_Портал"; // Note underscores in the namespace name.
  204. $wgNamespacesWithSubpages[NS_Portal] = true;
  205.  
  206. define("NS_FAQ", 3002);
  207. define("NS_FAQ_TALK", 3003);
  208. $wgExtraNamespaces[NS_FAQ] = "FAQ";
  209. $wgExtraNamespaces[NS_FAQ_TALK] = "обсуждение_FAQ";
  210. //Включаю субстраницы
  211. $wgNamespacesWithSubpages[NS_FAQ] = true;
  212.  
  213. $wgMainCacheType = CACHE_MEMCACHED;
  214. $wgParserCacheType = CACHE_MEMCACHED; # optional
  215. $wgMessageCacheType = CACHE_MEMCACHED; # optional
  216. $wgMemCachedServers = array( "127.0.0.1:11211" );
  217.  
  218. $wgSessionsInObjectCache = true; # optional
  219. $wgSessionCacheType = CACHE_MEMCACHED; # optional
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement