drupal-apache.conf 3.2 KB

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