drupal-apache.conf 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. ServerTokens Prod
  8. User @l_rusr@
  9. Group @l_rgrp@
  10. Listen 127.0.0.1:80
  11. # runtime files
  12. PidFile @l_prefix@/var/drupal/run/apache.pid
  13. ScoreBoardFile @l_prefix@/var/drupal/run/apache.sb
  14. LockFile @l_prefix@/var/drupal/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/drupal/log/apache.access.log common
  35. # error logging
  36. LogLevel warn
  37. ErrorLog @l_prefix@/var/drupal/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/drupal/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 Drupal
  69. AddType application/x-httpd-php .php
  70. php_admin_flag magic_quotes_gpc 0
  71. php_admin_flag register_globals 0
  72. php_admin_flag session.auto_start 0
  73. DocumentRoot @l_prefix@/share/drupal
  74. DirectoryIndex index.php
  75. ErrorDocument 404 /index.php
  76. ExpiresByType text/html A1
  77. <Directory "@l_prefix@/share/drupal">
  78. Options -Indexes +FollowSymLinks
  79. AllowOverride None
  80. Order allow,deny
  81. Allow from all
  82. RewriteEngine on
  83. RewriteCond %{REQUEST_FILENAME} !-f
  84. RewriteCond %{REQUEST_FILENAME} !-d
  85. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  86. <Files ~ "(\.(inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
  87. Order deny,allow
  88. Deny from all
  89. </Files>
  90. </Directory>