[Introduction] 1. Basic process of PHP5 4 environment matching Apache: Web service provider. Official website: www apache orgPHP: Official website: www php netMysql: Official website: www mysql com 2. Software download Apache download address: http: download csdn net detail lxq_xsyu 7057423PHP
By. Official website: www.apache.org
PHP: Official website: www.php.net
Mysql: Official website: www.mysql.com
Apache download address: http://download.csdn.net/detail/lxq_xsyu/7057423
PHP download address: http://download.csdn.net/detail/lxq_xsyu/7057401
Mysql download address: http://download.csdn.net/detail/lxq_xsyu/6468461
(1) Apache installation
Installation successful
(2) Decompress PHP5.4
##(3) Configure Apache’s httpd.conf file
Apache installation directory
ServerRoot "D:/Apache Software Foundation"
Listening port
Listen 12.34.56.78:80
##Listen 80
Load PHP component
##LoadModule php5_module " D:/php54/php5apache2_2.dll"
ServerName www.meritit.com:80
#
Error Log
##ErrorLog "logs/error.log"
# phpinfo( );
?>
# DocumentRoot "D:/Apache Software Foundation/a_com"
# ServerName 127.0.0.2
ServerAlias www.dummy-host.meritit.com
##
# ErrorLog "logs/dummy -host2.meritit.com-error.log"
# CustomLog "logs/dummy-host2.meritit.com- access.log" common
D:Environment construction and configuration for PHP mobile Internet developmentApache Software FoundationEnvironment construction and configuration for PHP mobile Internet developmenta_comEnvironment construction and configuration for PHP mobile Internet developmenta.php
## echo "aaaaaa";
##? >
D:Environment construction and configuration for PHP mobile Internet developmentApache Software FoundationEnvironment construction and configuration for PHP mobile Internet developmentb_comEnvironment construction and configuration for PHP mobile Internet developmentb.php
echo "bbbbbb";
##1. Basic process of PHP5.4 environment matching
PHP: Official website: www.php.net
Mysql: Official website: www.mysql.com
2. Software downloadApache download address: http://download.csdn.net/detail/lxq_xsyu/7057423
PHP download address: http://download.csdn.net/detail/lxq_xsyu/7057401
Mysql download address: http://download.csdn.net/detail/lxq_xsyu/6468461
3. Environment setup
(1)Apache installation
Successful installation
(2) Decompress PHP5.4
(3) Configure Apache’s httpd.conf file
Apache installation directory
ServerRoot "D:/Apache Software Foundation"
Listening port
#Listen 12.34.56.78:80
Listen 80
Loading PHP components
name of server
LoadModule php5_module "D:/php54/php5apache2_2.dll"
#ServerName www.meritit.com:80
- ## File root directory
- DocumentRoot "D:/Apache Software Foundation/htdocs"
## Permissions folder
- Index (default access to home page)
ErrorLog "logs/error.log"
DirectoryIndex index.html
##- # # Error log
Access log
CustomLog "logs/access.log" common
- ##
- Configure parsing php
AddType application/x-compress .Z
#ErrorDocument 500 "The server made a boo boo."
- ##AddType application/x-gzip .gz .tgz
- #AddType application/x-httpd-php .php
Error type
- ErrorDocument 404 /missing.html
- ErrorDocument 404 "/cgi-bin/missing_handler.pl"
- ErrorDocument 402 http://www.meritit.com/subscription_
4. Test whether the construction is successful
New a.php
# phpinfo();
##
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
DocumentRoot "D:/Apache Software Foundation/a_com"
- Two sites are configured in httpd-vhosts.conf as follows
Remove the above comment (open the virtual host configuration file)
- ## ServerName 127.0.0.2
- ServerAlias www.dummy-host.meritit.com
- ## ErrorLog "logs/dummy-host.meritit.com-error.log"
CustomLog "logs/dummy-host.meritit.com-access.log" common
- ##
# DocumentRoot "D:/Apache Software Foundation/b_com"
## ServerName 127.0.0.3
ErrorLog "logs/dummy-host2.meritit.com-error.log"## CustomLog "logs/dummy-host2.meritit.com-access.log" common
- ##
Note: Once a virtual host is configured, the DocumentRoot configured previously is invalid.
D:Environment construction and configuration for PHP mobile Internet developmentApache Software FoundationEnvironment construction and configuration for PHP mobile Internet developmenta_comEnvironment construction and configuration for PHP mobile Internet developmenta.php
- echo "aaaaaa";
- ##?>
- ## D:Environment construction and configuration for PHP mobile Internet developmentApache Software FoundationEnvironment construction and configuration for PHP mobile Internet developmentb_comEnvironment construction and configuration for PHP mobile Internet developmentb.php
- ## echo "bbbbbb";
- #?>
Note: You need to modify the permission folder directory
Access results:
The above is the detailed content of Environment construction and configuration for PHP mobile Internet development. For more information, please follow other related articles on the PHP Chinese website!