wordpress-apache.conf 3.5 KB

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