Prepare the software first:
Apache official: Httpd-2.2.25-win32-x86-openssl-0.9.8y.msi, more versions here;
PHP Official: Php-5.4.37-win32-vc9-x86.zip, more images, more version download;
MySQL official: Mysql-5.5.39-win32.msi, more images, more versions to download.
One, install Apache, configure the success of a common Web server
Run the downloaded "Httpd-2.2.25-win32-x86-openssl-0.9.8y.msi", the following interface appears
The installation Wizard interface for Apache HTTP Server 2.2.55 appears, click "Next" to continue
Confirm consent to the Software Installation license regulation, select "I accept the terms in the License Agreement", click "Next" to continue
For instructions on installing Apache to Windows, please read on and press "Next" to continue
System Information, fill in your domain name under network domain (for example: zkm.com), enter your server name under server name (for example: www.zkm.com, hostname plus domain name), and in Administrator ' s Email Address to fill in the system administrator's contact e-mail addresses (such as: [email protected]), the above three information for reference only, where the contact e-mail address in the case of a system failure to provide visitors, three information can be arbitrarily filled, invalid also line. Here are two options, the image is selected for all users of the system installation, using the default 80 port, and as a system service automatically start, the other is to install only for the current user, using port 8080, manually started. General choice. Press "Next" to continue.
Choose the installation type, typical as the default installation, custom for user-defined installation, we choose custom here, there are more options available. Press "Next" to continue
The Select installation Options screen appears, left-click on "Apache HTTP Server 2.0.55", select "This feature, and all subfeatures, would be installed on the local hard drive." , that is, "This section, and sub-sections of subordinate content, all installed on the local hard disk." Click "Change ..." To manually specify the installation directory.
I choose to install in the "D:\", you choose, generally recommended not installed in the operating system disk, lest the operating system is broken, the restore operation to the Apache configuration file also cleared. Select "OK" to continue.
Go back to the interface and select "Next" to continue.
Confirm that the installation options are correct, if you think you want to check again, you can click "Back" step-by-step to return to the check. Click "Install" to start installing the installation option as previously set
Installing the interface, please wait patiently until the following screen appears
The installation Wizard completed successfully, the lower right corner of the status bar should appear below the green icon, indicating that the Apache service has started to run, press "Finish" to end Apache software Installation
We are familiar with this icon, very convenient, left-click on the icon, the following interface, there are "start", "Stop", "Restart (restart)" Three options, it is convenient for the installation of Apache server to do this.
Okay, now let's test the Web interface that runs by default configuration, hit "http://127.0.0.1" in the IE Address bar, click "Go", you can see the following page, indicating that the Apache server has been installed successfully.
Page See It works! Description Apache service is installed ...
Now start configuring the Apache server so that it serves us better, in fact, if not configured,
The Apache2\htdocs folder in your installation directory is the default root directory of the website, where you can put the file.
Here we still have to configure, what problems or modifications, configuration is always going to be,
, "Start", "All Programs", "Apache HTTP Server 2.0.55", "Configure Apache Server", "Edit the Apache httpd conf Configuration file", click Open.
XP Notepad has a few changes, a very useful function is to see the file content of the row, column location,
As shown, click "View", tick "status bar", the bottom right corner of the interface has a number of markers,
"Ln, Col 10" means "row 78, Column 10", so that you can quickly locate in the file, easy to explain.
Of course, you can also use "edit", "find" to enter keywords to quickly locate.
Each configuration file changes, after saving, must be in the Apache server restart after the effective, you can use the small icon in front of the convenient control server at any time "restart"
XP Notepad has a few changes, a very useful function is to see the file content of the row, column location, as shown, point
"View", tick "status bar", the bottom right corner of the interface more than a mark, "Ln, Col 10" means "row 78, Column 10"
, so it can be quickly located in the document, easy to explain. Of course, you can also use "edit", "find" to enter keywords to quickly locate. Each time the configuration file
Changes, after saving, must be in the Apache server restart after the effective, you can use the small icon in front of the convenient control server at any time "restart."
Now formally start configuring the Apache server, "Ln 228", or look for the keyword "DocumentRoot" (that is, the Web site root directory),
Find the place as shown, and then change the address in the "" to your website root directory, address format please according to the picture, mainly the general file address
"\" in Apache to change to "/".
"Ln 253", similarly, you can also find "<directory" to locate, later no longer explain, the "" in the address of the same as the documentroot.
Ln321 ", DirectoryIndex (directory index, that is, in the case of a directory only, the default display of the file name), you can add a lot, the system will be based on the left-to-right order of precedence, separated by a single half-width space, For example, some of the site's homepage is index.htm, in the cursor there with "index.htm" filename is arbitrary, not necessarily "index.html", such as "test.php", etc., can be.
Here is a selection of configuration options, which may have been configured, now seems to be fixed, not configured, is to force all output file language encoding, HTML file has a language tag (this is the setting document language is gb2312) will also be cast. If you open a Web page garbled, please check the Web page there is no above HTML language tag, if not, add it can be displayed normally. "# DefaultLanguage NL" Before the "#" removed, "NL" to the language you want to force the output, Chinese is "ZH-CN", save, close.
OK, the simple Apache configuration is over, now with the previous small icon restart, all the configuration will take effect, your site becomes a Web server, if you load the firewall, open 80 or 8080 ports, or allow Apache program access to the network, otherwise people can not access. If you have a public network IP (general ADSL or telephone dial-up Internet is all), you can invite all Internet friends access to use HTTP.//Your IP address (IP address query can access HTTP.// www.zkm.com, query content within that is) your site, or if you do not have a public IP, you can also tell the intranet IP address to other users in the LAN, let them through http://Your intranet IP address, access to your website.
Installation and configuration diagram of Apache+php+mysql+sqlyog under Windows7