punbb-apache.conf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ##
  2. ## punbb-apache.conf -- PunBB Apache Custom Configuration
  3. ##
  4. ServerRoot @l_prefix@
  5. ServerAdmin root@@l_hostname@.@l_domainname@
  6. ServerName @l_hostname@.@l_domainname@
  7. ServerTokens Prod
  8. User @l_rusr@
  9. Group @l_rgrp@
  10. Listen 127.0.0.1:8080
  11. # runtime files
  12. PidFile @l_prefix@/var/punbb/run/apache.pid
  13. ScoreBoardFile @l_prefix@/var/punbb/run/apache.sb
  14. LockFile @l_prefix@/var/punbb/run/apache.lck
  15. # include apache-php
  16. Include @l_prefix@/etc/apache/apache.d/apache-php.conf
  17. # server behaviour
  18. Timeout 300
  19. KeepAlive on
  20. MaxKeepAliveRequests 100
  21. KeepAliveTimeout 15
  22. MinSpareServers 5
  23. MaxSpareServers 10
  24. StartServers 5
  25. MaxClients 15
  26. MaxRequestsPerChild 500
  27. HostnameLookups off
  28. UseCanonicalName on
  29. # access logging
  30. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  31. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  32. LogFormat "%{Referer}i -> %U" referer
  33. LogFormat "%{User-agent}i" agent
  34. CustomLog @l_prefix@/var/punbb/log/apache.access.log common
  35. # error logging
  36. LogLevel warn
  37. ErrorLog @l_prefix@/var/punbb/log/apache.error.log
  38. ServerSignature on
  39. # secure root directory
  40. <Directory />
  41. Options FollowSymLinks
  42. AllowOverride None
  43. </Directory>
  44. # browser specifics
  45. BrowserMatch "Mozilla/2" nokeepalive
  46. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  47. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  48. BrowserMatch "Java/1\.0" force-response-1.0
  49. BrowserMatch "JDK/1\.0" force-response-1.0
  50. # SSL/TLS support
  51. <IfModule ssl_module>
  52. SSLRandomSeed startup builtin
  53. SSLRandomSeed connect builtin
  54. SSLMutex sem
  55. SSLSessionCache shmcb:@l_prefix@/var/punbb/run/apache.scache(512000)
  56. SSLSessionCacheTimeout 300
  57. SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  58. SetEnvIf User-Agent ".*MSIE.*" \
  59. nokeepalive ssl-unclean-shutdown \
  60. downgrade-1.0 force-response-1.0
  61. <Files ~ "\.(cgi|shtml|phtml|php?)$">
  62. SSLOptions +StdEnvVars
  63. </Files>
  64. <Directory "@l_prefix@/cgi">
  65. SSLOptions +StdEnvVars
  66. </Directory>
  67. </IfModule>
  68. # configure PHP for phpBB
  69. AddType application/x-httpd-php .php
  70. php_admin_flag register_globals off
  71. php_admin_flag safe_mode on
  72. php_admin_flag safe_mode_gid on
  73. php_admin_flag allow_url_fopen off
  74. php_admin_flag display_errors off
  75. php_admin_value log_errors on
  76. php_admin_value max_execution_time 60
  77. php_admin_value max_input_time 60
  78. php_admin_value memory_limit 8M
  79. php_admin_value post_max_size 8M
  80. php_admin_value include_path .:@l_prefix@/lib/punbb:@l_prefix@/lib/php
  81. php_admin_value safe_mode_include_dir @l_prefix@/lib/punbb
  82. # configure phpBB
  83. RewriteEngine on
  84. RewriteRule ^/$ /punbb/ [R,L]
  85. Alias /punbb @l_prefix@/lib/punbb
  86. DocumentRoot @l_prefix@/lib/punbb
  87. DirectoryIndex index.php
  88. <Directory "@l_prefix@/lib/punbb">
  89. Options Indexes ExecCGI FollowSymLinks
  90. AllowOverride All
  91. Order allow,deny
  92. Allow from all
  93. </Directory>