tips:redirect_farm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:redirect_farm [2012-11-01 17:44] – Added note about new farms documentation Michitux | tips:redirect_farm [2017-06-27 23:52] (current) – 144.91.58.132 | ||
---|---|---|---|
Line 221: | Line 221: | ||
</ | </ | ||
- | **Test:** Point your browser to '' | + | **Test:** Point your browser to '' |
=== Clear the farmer wiki === | === Clear the farmer wiki === | ||
Line 233: | Line 233: | ||
</ | </ | ||
- | At present, css.php tests for the existence of data/pages. Hopefully, this will be fixed: http:// | + | At present, css.php tests for the existence of data/pages. Hopefully, this will be fixed: |
==== Step 5: Create an Animal ==== | ==== Step 5: Create an Animal ==== | ||
Line 316: | Line 316: | ||
===== Advanced Configuration ===== | ===== Advanced Configuration ===== | ||
- | ==== Using a Script to Setup an Animal ==== | + | ==== Using a Bash Script to Setup an Animal ==== |
Here's a little bash script which will perform the above steps in one go inside the directory it's executed in (if you're using this with other scripts you have to make sure you '' | Here's a little bash script which will perform the above steps in one go inside the directory it's executed in (if you're using this with other scripts you have to make sure you '' | ||
Line 397: | Line 397: | ||
You may need to set the '' | You may need to set the '' | ||
# \$conf[' | # \$conf[' | ||
- | This will create a '' | + | This will create a '' |
- | + | ||
+ | ==== Using a Powershell Script to Setup an Animal ==== | ||
+ | for those who prefer IIS, here is a small powershell script. You need to customize it to your Environment. Be aware, we use Active Directory and SSO. This script is still an alpha version! | ||
+ | Features of this script: | ||
+ | * Create AD Groups for Control ACL over AD Groups | ||
+ | * Set NTFS Permissions on IIS Server | ||
+ | * Enable SSO | ||
+ | |||
+ | Tested with IIS 8 and PHP 5.6 and Detritus. | ||
+ | <code New-DokuwikiAnimal.ps1> | ||
+ | <# | ||
+ | .SYNOPSIS | ||
+ | Legt Dokuwiki Animals an. | ||
+ | .DESCRIPTION | ||
+ | Legt Dokuwiki Animals an. Inklusive AD-Gruppen, ACL, Konfig, NTFS Rechte, .... | ||
+ | .EXAMPLE | ||
+ | New-DokuwikiAnimal.ps1 -Animal IT | ||
+ | .INPUTS | ||
+ | Animal | ||
+ | .OUTPUTS | ||
+ | Keine. | ||
+ | .NOTES | ||
+ | Author | ||
+ | Filename | ||
+ | Requires | ||
+ | |||
+ | Version | ||
+ | History | ||
+ | .LINK | ||
+ | |||
+ | #> | ||
+ | |||
+ | Param( | ||
+ | [Parameter(Mandatory=$false, | ||
+ | [String]$Animal=" | ||
+ | ) | ||
+ | |||
+ | clear-host | ||
+ | ### Parameters ### | ||
+ | $wwwroot =" | ||
+ | $farmpath = $wwwroot+" | ||
+ | $GroupOU = " | ||
+ | $wikiadmins = " | ||
+ | $GroupPreFix = " | ||
+ | $ErrorActionPreference = " | ||
+ | $before = Get-Date | ||
+ | $date = get-date -format yyyyMMdd-HHmm | ||
+ | |||
+ | ### Proof for administrative permissions (UAC) ### | ||
+ | If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]:: | ||
+ | { | ||
+ | Write-Warning "Not run as administrator! You failed! ;)" | ||
+ | break | ||
+ | } | ||
+ | |||
+ | Write-Host "Lade ActiveDirectory Module" | ||
+ | try | ||
+ | { | ||
+ | Import-Module ActiveDirectory | ||
+ | } | ||
+ | catch | ||
+ | { | ||
+ | Write-Warning " | ||
+ | break | ||
+ | } | ||
+ | |||
+ | If ($Animal -eq " | ||
+ | Write-Host "" | ||
+ | $Animal = $( Read-Host "How should the animal be named?" | ||
+ | Write-Host "" | ||
+ | } | ||
+ | |||
+ | $cleananimal = $($Animal -replace " ","" | ||
+ | $animalpath = $farmpath+" | ||
+ | try | ||
+ | { | ||
+ | new-item -Path $animalpath -ItemType directory| Out-Null | ||
+ | } | ||
+ | catch | ||
+ | { | ||
+ | break | ||
+ | } | ||
+ | |||
+ | $GroupRead = $GroupPreFix+$Animal+" | ||
+ | $GroupEditor = $GroupPreFix+$Animal+" | ||
+ | $GroupManager = $GroupPreFix+$Animal+" | ||
+ | $GroupAdmins = $GroupPreFix+$Animal+" | ||
+ | |||
+ | New-ADGroup -Name $GroupRead -SamAccountName $GroupRead -GroupCategory Security -GroupScope Global -DisplayName $GroupRead -Path $GroupOU | ||
+ | New-ADGroup -Name $GroupEditor -SamAccountName $GroupEditor -GroupCategory Security -GroupScope Global -DisplayName $GroupEditor -Path $GroupOU | ||
+ | New-ADGroup -Name $GroupManager -SamAccountName $GroupManager -GroupCategory Security -GroupScope Global -DisplayName $GroupManager -Path $GroupOU" | ||
+ | New-ADGroup -Name $GroupAdmins -SamAccountName $GroupAdmins -GroupCategory Security -GroupScope Global -DisplayName $GroupAdmins -Path $GroupOU | ||
+ | |||
+ | Add-ADGroupMember $GroupAdmins $wikiadmins | ||
+ | Add-ADGroupMember $GroupRead $GroupEditor, | ||
+ | |||
+ | |||
+ | $inherit = [system.security.accesscontrol.InheritanceFlags]" | ||
+ | $propagation = [system.security.accesscontrol.PropagationFlags]" | ||
+ | $modify = [System.Security.AccessControl.FileSystemRights]" | ||
+ | $read = [System.Security.AccessControl.FileSystemRights]" | ||
+ | |||
+ | $groups = @($GroupRead, | ||
+ | foreach ($group in $groups) { | ||
+ | |||
+ | $Acl = (Get-Item $wwwroot).GetAccessControl(' | ||
+ | $Ar = New-Object | ||
+ | $Acl.AddAccessRule($Ar) | ||
+ | Set-Acl $wwwroot $Acl | ||
+ | |||
+ | $Acl = (Get-Item $farmpath).GetAccessControl(' | ||
+ | $Ar = New-Object | ||
+ | $Acl.AddAccessRule($Ar) | ||
+ | Set-Acl $farmpath $Acl | ||
+ | |||
+ | $Acl = (Get-Item $($wwwroot+" | ||
+ | $Ar = New-Object | ||
+ | $Acl.AddAccessRule($Ar) | ||
+ | Set-Acl $($wwwroot+" | ||
+ | |||
+ | ##NTFS Für Animal | ||
+ | $Acl = (Get-Item $animalpath).GetAccessControl(' | ||
+ | IF ($group -eq $GroupEditor -OR $group -eq $GroupManager -OR $group -eq $GroupAdmin) { | ||
+ | $Ar = New-Object | ||
+ | } Else { | ||
+ | $Ar = New-Object | ||
+ | } | ||
+ | $Acl.AddAccessRule($Ar) | ||
+ | Set-Acl $animalpath $Acl | ||
+ | } | ||
+ | |||
+ | new-item -Path $($animalpath+" | ||
+ | new-item -Path $($animalpath+" | ||
+ | $verz = @(" | ||
+ | foreach ($ver in $verz) { | ||
+ | new-item -Path $($animalpath+" | ||
+ | } | ||
+ | $conffiles = @(" | ||
+ | foreach ($conffile in $conffiles) { | ||
+ | new-item -Path $($animalpath+" | ||
+ | } | ||
+ | Copy-Item -Path $($wwwroot+" | ||
+ | Copy-Item -Path $($wwwroot+" | ||
+ | Copy-Item -Path $($wwwroot+" | ||
+ | Copy-Item -Path $($wwwroot+" | ||
+ | |||
+ | ### Writing | ||
+ | $lc = $animalpath+" | ||
+ | "<? | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | $file_content = Get-Content " | ||
+ | [System.IO.File]:: | ||
+ | |||
+ | ##Set ACL | ||
+ | ### Writing acl.auth.php | ||
+ | $aclc = $animalpath+" | ||
+ | $file= " | ||
+ | "# acl.auth.php" | ||
+ | "# <?php exit()?>" | ||
+ | "# Don't modify the lines above" | Out-File $aclc -Append | ||
+ | "# Access Control Lists" | Out-File $aclc -Append | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | $file_content = Get-Content " | ||
+ | [System.IO.File]:: | ||
+ | |||
+ | ## Startseite | ||
+ | $startpage = $animalpath+" | ||
+ | " | ||
+ | "==== Usage of DokuWiki ====" |Out-File $startpage -Append | ||
+ | " | ||
+ | " | ||
+ | |||
+ | $file_content = Get-Content " | ||
+ | [System.IO.File]:: | ||
+ | </ | ||
+ | |||
+ | --- [[user> | ||
==== URL Rewriting ==== | ==== URL Rewriting ==== | ||
Line 405: | Line 611: | ||
==== Enabling/ | ==== Enabling/ | ||
- | Since Angua the plugins can be enabled and disabled per animal using the plugin manager | + | Since Angua the plugins can be enabled and disabled per animal using the plugin manager. Activating and deactivating is stored in the '' |
But before Angua you would need to change the following: | But before Angua you would need to change the following: | ||
tips/redirect_farm.1351788260.txt.gz · Last modified: 2012-11-01 17:44 by Michitux