emprit

httpd-xampp.conf

Feb 22nd, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. #
  2. # XAMPP settings
  3. #
  4.  
  5. <IfModule env_module>
  6. SetEnv MIBDIRS "/xampp-portable/php/extras/mibs"
  7. SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
  8. SetEnv OPENSSL_CONF "/xampp-portable/apache/bin/openssl.cnf"
  9. SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
  10. SetEnv PHPRC "\\xampp\\php"
  11. SetEnv TMP "\\xampp\\tmp"
  12. </IfModule>
  13.  
  14. #
  15. # PHP-Module setup
  16. #
  17. LoadFile "/xampp-portable/php/php5ts.dll"
  18. LoadModule php5_module "/xampp-portable/php/php5apache2_4.dll"
  19.  
  20. <FilesMatch "\.php$">
  21. SetHandler application/x-httpd-php
  22. </FilesMatch>
  23. <FilesMatch "\.phps$">
  24. SetHandler application/x-httpd-php-source
  25. </FilesMatch>
  26.  
  27. #
  28. # PHP-CGI setup
  29. #
  30. #<FilesMatch "\.php$">
  31. # SetHandler application/x-httpd-php-cgi
  32. #</FilesMatch>
  33. #<IfModule actions_module>
  34. # Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
  35. #</IfModule>
  36.  
  37.  
  38. <IfModule php5_module>
  39. PHPINIDir "/xampp-portable/php"
  40. </IfModule>
  41.  
  42. <IfModule mime_module>
  43. AddType text/html .php .phps
  44. </IfModule>
  45.  
  46. ScriptAlias /php-cgi/ "/xampp-portable/php/"
  47. <Directory "/xampp-portable/php">
  48. AllowOverride None
  49. Options None
  50. Require all denied
  51. <Files "php-cgi.exe">
  52. Require all granted
  53. </Files>
  54. </Directory>
  55.  
  56. <Directory "/xampp-portable/cgi-bin">
  57. <FilesMatch "\.php$">
  58. SetHandler cgi-script
  59. </FilesMatch>
  60. <FilesMatch "\.phps$">
  61. SetHandler None
  62. </FilesMatch>
  63. </Directory>
  64.  
  65. <Directory "/xampp-portable/htdocs/xampp">
  66. <IfModule php5_module>
  67. <Files "status.php">
  68. php_admin_flag safe_mode off
  69. </Files>
  70. </IfModule>
  71. AllowOverride AuthConfig
  72. </Directory>
  73.  
  74. <IfModule alias_module>
  75. Alias /security "/xampp-portable/security/htdocs/"
  76. <Directory "/xampp-portable/security/htdocs">
  77. <IfModule php5_module>
  78. <Files "xamppsecurity.php">
  79. php_admin_flag safe_mode off
  80. </Files>
  81. </IfModule>
  82. AllowOverride AuthConfig
  83. Require all granted
  84. </Directory>
  85.  
  86. Alias /licenses "/xampp-portable/licenses/"
  87. <Directory "/xampp-portable/licenses">
  88. Options +Indexes
  89. <IfModule autoindex_color_module>
  90. DirectoryIndexTextColor "#000000"
  91. DirectoryIndexBGColor "#f8e8a0"
  92. DirectoryIndexLinkColor "#bb3902"
  93. DirectoryIndexVLinkColor "#bb3902"
  94. DirectoryIndexALinkColor "#bb3902"
  95. </IfModule>
  96. Require all granted
  97. </Directory>
  98.  
  99. Alias /phpmyadmin "/xampp-portable/phpMyAdmin/"
  100. <Directory "/xampp-portable/phpMyAdmin">
  101. AllowOverride AuthConfig
  102. Require all granted
  103. </Directory>
  104.  
  105. Alias /webalizer "/xampp-portable/webalizer/"
  106. <Directory "/xampp-portable/webalizer">
  107. <IfModule php5_module>
  108. <Files "webalizer.php">
  109. php_admin_flag safe_mode off
  110. </Files>
  111. </IfModule>
  112. AllowOverride AuthConfig
  113. Require all granted
  114. </Directory>
  115. </IfModule>
  116.  
  117. #
  118. # New XAMPP security concept
  119. #
  120. <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
  121. Order deny,allow
  122. Deny from all
  123. Allow from ::1 127.0.0.0/8 \
  124. fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
  125. fe80::/10 169.254.0.0/16
  126. Allow from All
  127. ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
  128. </LocationMatch>
Advertisement
Add Comment
Please, Sign In to add comment