Advertisement
Guest User

Untitled

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