apache2-app.conf 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <VirtualHost *:80>
  2. DocumentRoot /app/data/public
  3. ErrorLog "|/bin/cat"
  4. CustomLog "|/bin/cat" combined
  5. <Directory /app/data/public>
  6. Options +FollowSymLinks
  7. AllowOverride All
  8. Require all granted
  9. Options -Indexes
  10. AddType application/x-java-archive .jar
  11. AddType audio/ogg .oga
  12. #AddHandler php53-cgi .php
  13. <FilesMatch "\.(out|log)$">
  14. <IfModule authz_host_module>
  15. #Apache 2.4
  16. Require all denied
  17. </IfModule>
  18. <IfModule !authz_host_module>
  19. #Apache 2.2
  20. Deny from all
  21. </IfModule>
  22. </FilesMatch>
  23. <IfModule mod_rewrite.c>
  24. RewriteEngine on
  25. # Protect repository directory from browsing
  26. RewriteRule "(^|/)\.git" - [F]
  27. # Rewrite current-style URLs of the form 'index.php?pagename=x'.
  28. # Also place auth information into REMOTE_USER for sites running
  29. # in CGI mode.
  30. # If you have troubles or use VirtualDocumentRoot
  31. # uncomment this and set it to the path where your friendica installation is
  32. # i.e.:
  33. # Friendica url: http://some.example.com
  34. # RewriteBase /
  35. # Friendica url: http://some.example.com/friendica
  36. # RewriteBase /friendica/
  37. #
  38. #RewriteBase /
  39. RewriteCond %{REQUEST_FILENAME} !-f
  40. RewriteCond %{REQUEST_FILENAME} !-d
  41. RewriteRule ^(.*)$ index.php?pagename=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
  42. </IfModule>
  43. </Directory>
  44. ## PMA BEGIN
  45. Alias /phpmyadmin /app/code/phpmyadmin
  46. <Location /phpmyadmin>
  47. AuthType Basic
  48. AuthBasicProvider ldap
  49. AuthName "Cloudron Authorization"
  50. AuthLDAPURL ldap://url/basedn?username??(objectclass=user)
  51. AuthLDAPBindDN abouttochange
  52. AuthLDAPBindPassword abouttochange
  53. Require valid-user
  54. </Location>
  55. ## PMA END
  56. </VirtualHost>