wordpress-apache.conf 3.7 KB

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