To install XAMPP, there are some things to note:
A. Modify the default HTTP port 80 to a local unused port
1.1 Find X:\XAMPP\xampp\apache\conf\httpd.conf
1.2 Find all 80 in the file and replace it with an unused port
Two. Modify the default SSL port 443 for local unused ports
2.1 Find X:\XAMPP\xampp\apache\conf\extra\httpd-ssl.conf
2.2 Find all 443 in the file and replace it with an unused port Note: Modifying only 80 is also unable to start Apache's
Three. Security
3.1 Set Http://localhost:xxxx to set the password for a Web management platform that only allows local use of &http://localhost:xxxx
Specific actions: HTTP://LOCALHOST:XXXX, select the Security menu, it will let you set the MySQL, XAMPP management platform password and whether only in the local machine use of the link, select the operation on the line
or modify the following in the configuration file (xampp\apache\conf\extra\httpd-xampp.conf):
<locationmatch "^/(?: xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))" >
Order Deny,allow
Deny from all
#Allow from all
Allow from 192.168.1.0/8
ErrorDocument 403/error/http_xampp_forbidden.html.var
</locationmatch>
Four.
Using 360safe to clean up the system garbage will often empty the lang.tmp, resulting in the local open http://localhost:xxxx, will prompt
Warning:file_get_contents (LANG.TMP) [function.file-get-contents]: failed to open stream:no such file or directory in C:\ Soft\xampp\xampp\htdocs\xampp\index.php on line 2
Warning:cannot Modify header Information-headers already sent by (output started at C:\soft\xampp\xampp\htdocs\xampp\in Dex.php:2) in C:\soft\xampp\xampp\htdocs\xampp\index.php on line 4
Similar to this error, resulting in the inability to login to MySQL phpMyAdmin
Workaround:
The reason for this problem is that some cleanup software has removed the lang.tmp file.
Fix method: Only need to build an empty file lang.tmp put under D:\Program files\xampp\htdocs\xampp can. First landing on the home page, the choice of language will be in this file to write data, such as the choice of Chinese is en, English is en.
Five. Open the common module
URL rewrite module, curl module, deflate module, etc. are the most commonly used, almost every open source software will be used, so need to open in advance
Open method:
1. Find X:\XAMPP\xampp\apache\conf\httpd.conf
Search LoadModule Rewrite_module in 2.httpd.conf to remove the # number in front of the line
3. Restart Apache
Note: others, etc.
LoadModule Deflate_module modules/mod_deflate.so
LoadModule Rewrite_module modules/mod_rewrite.so
LoadModule Ssl_module modules/mod_ssl.so
LoadModule Mem_cache_module modules/mod_mem_cache.so
How can you tell if the system has loaded these modules?
You can create a test.php file in the root directory of your site, which requires only 1 lines of code
<?php phpinfo ()?>
You can see a list of the modules loaded in the related blocks.
and open curl is not the same, need to Xampp\php\php.ini (specifically see Phpinfo load configuration file address) found in
Extension=php_curl.dll this line, default to 582 lines, remove the semicolon
A method like this has open gd2.
Extension=php_gd2.dll
Six. Set the default site
Some open source software, need to run in the root directory, you need to set the default site
Method:
Under the apache/conf/httpd.conf will
DocumentRoot set to "D:/program files/xampp/htdocs/test"
This allows you to access the files directly in the directory with IP or domain names.
In addition, I was doing URL rewrite test, found that the site in the level two directory can not be rewritten
Seven. Host multiple domain names and multiple sites on a single server
Open Vhost Mode
Namevirtualhost *:80
<virtualhost *:80>
DocumentRoot "D:/program files/xampp/htdocs/site Folder"
ServerName www.bbbbbbb.com
</virtualhost>
< VirtualHost *:80>
DocumentRoot "D:/program files/xampp/htdocs/site Folder"
ServerName www.aaaaaaa.com
</virtualhost>