apache2.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ErrorLog /dev/stderr
  2. LogLevel warn
  3. # LogLevel info rewrite:trace3
  4. # Permission denied: AH00099: could not create /var/run/apache2.pid
  5. PidFile /tmp/apache2.pid
  6. IncludeOptional mods-enabled/*.load
  7. IncludeOptional mods-enabled/*.conf
  8. Timeout 128
  9. KeepAlive On
  10. MaxKeepAliveRequests 32
  11. KeepAliveTimeout 8
  12. Listen 8080
  13. # <IfModule ssl_module>
  14. # Listen 443
  15. # </IfModule>
  16. # <IfModule mod_gnutls.c>
  17. # Listen 443
  18. # </IfModule>
  19. ServerTokens Prod
  20. ServerSignature Off
  21. FileETag None
  22. TraceEnable off
  23. Header always set X-Frame-Options "sameorigin"
  24. Header set X-XSS-Protection "1; mode=block"
  25. LogFormat "%{%Y-%m-%dT%H:%M:%S%z}t %h \"%r\" %>s" neat
  26. CustomLog /dev/stdout neat
  27. # TODO enable sendfile
  28. # apt-get install --yes libapache2-mod-xsendfile
  29. # XSendFile on
  30. # XSendFilePath /library
  31. # https://koel.phanan.net/docs/
  32. # https://tn123.org/mod_xsendfile/
  33. <VirtualHost *:8080>
  34. # TODO ssl
  35. DocumentRoot /koel
  36. </VirtualHost>
  37. <Directory />
  38. AllowOverride None
  39. Require all denied
  40. </Directory>
  41. AccessFileName .htaccess
  42. <FilesMatch "^\.ht">
  43. Require all denied
  44. </FilesMatch>
  45. <Directory /koel>
  46. Options -Indexes -Includes -FollowSymLinks +SymLinksIfOwnerMatch
  47. # TODO restrict
  48. AllowOverride All
  49. Require all granted
  50. </Directory>
  51. IncludeOptional conf-enabled/*.conf