0046.html 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Web Based File Management with PHP and Tiny File Manager</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="PHP Web Based File Browser,Web Server,Apache,Web Developer,System Administrator,PHP,File Manager,Web Based,Tiny File Manager,Browser Based,Home Lab,Install Guide,Self-Hosted,Web Based Tools,Active Directory,Windows,Microsoft,PHP LDAP Authentication,PHP Active Directory Authentication,TinyFileManager,PHP Application,Web Based Utility,Apache HTTPD,Apache HTTPD Configuration,Web Server Administration,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Web Based File Management with PHP and Tiny File Manager">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="03/26/2022 09:58:47 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Web Based File Management with PHP and Tiny File Manager</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>Download and Setup Tiny File Manager</h2>
  26. <ol>
  27. <li>Download Tiny File Manager <a href="https://github.com/prasathmani/tinyfilemanager/releases" target="_blank">Download</a></li>
  28. <li>Extract the Tiny File Manager files</li>
  29. <li>Copy TinyFileManager.php to Apache install directory/htdocs/filemanager</li>
  30. <li>Rename TinyFileManager.php to index.php</li>
  31. <li>Edit index.php in a text editor</li>
  32. <li>Find $use_auth and set the value to false</li>
  33. <li>Save</li>
  34. <li>Open a web browser and navigate to https://DNSorIP/filemanager</li>
  35. </ol>
  36. <h2>Customizing Root Location and Authentication</h2>
  37. <ol>
  38. <li>Optionally, Edit Apache install directory/htdocs/filemanager/index.php</li>
  39. <li>Find $root_path and edit the value to limit the scope of the file manager</li>
  40. <li>Save index.php</li>
  41. <li>Navigate to the Apache install directory/conf in Explorer</li>
  42. <li>Edit httpd.conf in a text editor</li>
  43. <li>Find the authnz_ldap_module and make sure it is enabled by removing the # at the start of the line
  44. <p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so</p>
  45. </li>
  46. <li>Find the ldap_module and make sure it is enabled by removing the # at the start of the line
  47. <p>LoadModule ldap_module modules/mod_ldap.so</p>
  48. </li>
  49. <li>Create a Location block to enable LDAP authentication for the specified directory
  50. <p>&lt;location /filemanager&gt;<br />
  51. # Basic authentication with LDAP against MS AD<br />
  52. AuthType Basic<br />
  53. AuthBasicProvider ldap<br />
  54. <br />
  55. # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
  56. # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
  57. AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE</p>
  58. <p> # The LDAP bind username and password<br />
  59. AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
  60. AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
  61. LDAPReferrals Off<br />
  62. AuthUserFile /dev/null<br />
  63. <br />
  64. AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
  65. # to authenticate a domain group, specify the full DN<br />
  66. AuthLDAPGroupAttributeIsDN on<br />
  67. require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local<br />
  68. &lt;/location&gt;</p>
  69. </li>
  70. <li>Save httpd.conf</li>
  71. <li>Restart the Apache service</li>
  72. <li>Refresh https://DNSorIP/filemanager</li>
  73. </ol>
  74. </div>
  75. </div>
  76. </body>
  77. </html>