DokuWiki

It's better when it's simple

User Tools

Site Tools


farms:advanced

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
farms:advanced [2013-11-28 17:46] – [Running farms behind reverse proxies] JimmyLfarms:advanced [2022-04-21 16:56] (current) – [Disabling access to the farmer] 92.175.109.225
Line 15: Line 15:
 <file php> <file php>
 $config_cascade['main']['default'][] = DOKU_INC.'conf/local.php'; $config_cascade['main']['default'][] = DOKU_INC.'conf/local.php';
-$config_cascade['main']['default'][] = DOKU_INC.'conf/local.protected.php';+$config_cascade['main']['protected'][] = DOKU_INC.'conf/local.protected.php';
 </file> </file>
  
Line 33: Line 33:
  
 at the end of ''inc/preload.php'' (after the inclusion of ''farm.php''). at the end of ''inc/preload.php'' (after the inclusion of ''farm.php'').
 +
 +
 +
 +
 +coucou c'est moi le hacker
 +===== Central user management =====
 +
 +If some or all of your animals shall share the users you can do that not just by using the same external authentication but also with the default user management of DokuWiki by setting the path to the user list to the same location at the end of ''inc/preload.php'':
 +
 +<code php>
 +$config_cascade['plainauth.users'] = array(
 +    'default'   => '/your/path/to/conf/users.auth.php',
 +);
 +</code>
 +
 +If you want to do that just for some animals you can of course simply add a condition based on the value of ''DOKU_CONF''.
  
 ===== Flexible .htaccess-based setups ===== ===== Flexible .htaccess-based setups =====
Line 83: Line 99:
 The ''RewriteCond'' statements prevent redirect loops when your farmer directory is inside the animal directory. That way you can also put an animal in the root directory of a domain. The ''RewriteCond'' statements prevent redirect loops when your farmer directory is inside the animal directory. That way you can also put an animal in the root directory of a domain.
  
-===== Running farms behind reverse proxies =====+===== Running a farm behind reverse proxy =====
  
 This is when you set up your farm on a backend server (e.g. http://11.22.33.44) and present your wikis to the world via a front-end Apache server (e.g. http://www.example.com). This is when you set up your farm on a backend server (e.g. http://11.22.33.44) and present your wikis to the world via a front-end Apache server (e.g. http://www.example.com).
Line 101: Line 117:
 On the backend server my wiki about bears (once fully setup) will be available at the following address: http://11.22.33.44/wikis/farm/bear On the backend server my wiki about bears (once fully setup) will be available at the following address: http://11.22.33.44/wikis/farm/bear
  
-However, on the frontend server I want to present my wiki with the following address (notice I've chosen to drop the 's' from 'wikis'): http://www.example.com/wiki/bear+However, on the frontend server I want to present my wiki with the following address (notice I've chosen to drop the 's' from 'wikis' in this URL): http://www.example.com/wiki/bear
  
 Using the .htaccess type of setup, I set up ''/var/www/wikis/farm/.htaccess'' with the following code: Using the .htaccess type of setup, I set up ''/var/www/wikis/farm/.htaccess'' with the following code:
Line 115: Line 131:
 Under ''/var/www/wikis/farm/bear/conf'' I then edit **local.protected.php** like so (note: this uses the front-end address): Under ''/var/www/wikis/farm/bear/conf'' I then edit **local.protected.php** like so (note: this uses the front-end address):
  
-<code php php>+<code php local.protected.php>
 <?php <?php
 /** /**
Line 133: Line 149:
     <Location /wiki>     <Location /wiki>
       ProxyPass http://11.22.33.44/wikis/farm       ProxyPass http://11.22.33.44/wikis/farm
-      ProxyPassReverse http://111.22.33.44/wikis/farm+      ProxyPassReverse http://11.22.33.44/wikis/farm
     </Location>     </Location>
 </code> </code>
Line 150: Line 166:
     <Location /wiki>     <Location /wiki>
       ProxyPass http://11.22.33.44/wikis/farm       ProxyPass http://11.22.33.44/wikis/farm
-      ProxyPassReverse http://111.22.33.44/wikis/farm+      ProxyPassReverse http://11.22.33.44/wikis/farm
       Header edit Location ^http://11.22.33.44 http://www.example.com       Header edit Location ^http://11.22.33.44 http://www.example.com
     </Location>     </Location>
farms/advanced.1385657168.txt.gz · Last modified: 2013-11-28 17:46 by JimmyL

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki