Apache + PHP + MySQL installation and configuration in Windows (text) page 1/2

Source: Internet
Author: User
Tags php server website server

Prepare the software first:

1. install Apache. A common website server is successfully configured.

Run the downloaded "apache_2.0.55-win32-x86-no_ssl.msi", the following interface appears:

On the Installation Wizard Page of Apache HTTP Server 2.0.55, click "Next" to continue.

Confirm to agree to the software installation license Ordinance, select "I accept the terms in the license agreement", and click "Next" to continue

For instructions on installing Apache on windows, please read the instructions and press "Next" to continue

Set system information, enter your domain name (for example, goodwaiter.com) under network domain, and enter your server name (for example, www.goodwaiter.com, that is, the host name and domain name) under server name ), fill in the system administrator's contact email address (for example, yinpeng@xinhuanet.com) under administrator's email address, the above three information is for reference only, the contact email address will be provided to the visitor when the system fails. All three pieces of information can be filled in at will. The following two options are available: the image is installed for all users of the system, the default port 80 is used, and automatically started as the system service; the other is installed only for the current user, use port 8080 to manually start the instance. Generally. Press "Next" to continue.]

Select the installation type, typical is the default installation, and custom is the User-Defined installation. Here we select Custom for more options. Press "Next" to continue

The "Select installation option" page appears. Click "Apache HTTP Server 2.0.55" and select "this feature, and all subfeatures, will be installed on local hard drive. ", that is," This part and its sub-parts are all installed on the local hard disk ". Click "change..." to manually specify the installation directory.

I chose to install it on "D: \" here. You have selected it by yourself. Generally, we recommend that you do not install it on the disk where the operating system is located, so that the operating system will not be damaged, the restore operation also clears the Apache configuration file. Select "OK" to continue.

Return to the interface and select "Next" to continue.

Confirm that the installation options are correct. If you think you want to check again, click "back" to return to the check step by step. Click "Install" to start installation according to the preceding installation options.

Installing the interface. Please wait until the following figure is displayed.

The Installation Wizard is successful. The following green icon should appear in the status bar in the lower right corner, indicating that the apache service has started running. Press "finish" to complete the installation of Apache Software.

Let's get familiar with this icon, which is very convenient. You can click it on the icon and the following interface appears, including "start" and "stop) you can easily perform the preceding operations on the installed Apache server.

Now let's test the default setting.ConfigurationOn the running website page, click "http: // 127.0.0.1" in the IE Address Bar and click "go". The following page is displayed, indicating that the Apache server has been installed successfully.

Now, configure the Apache server to better serve us. In fact, if you do notConfigurationThe apache2 \ htdocs folder under your installation directory is the default root directory of the website. You can simply put a file in it. Here we still wantConfigurationIf you have any questions or modifications,ConfigurationAlways Yes, "START", "AllProgram"," Apache HTTP Server 2.0.55 "," Configure Apache server "," edit the Apache httpd conf configuration file ", and click open.

CTRL + mouse wheel to zoom in/out "src =" http://files.jb51.net/upload/20080226120424287.gif "width =" 716 "onLoad =" If (this. width> screen. width * 0.7) {This. resized = true; this. width = screen. width * 0.7; this. alt = 'click here to open new window \ nctrl + mouse wheel to zoom in/out';} "border =" 0 "resized =" true ">

XP notepad has made some minor changes. A very practical function is to view the row and column positions of the file content, as shown in. Click "View" and select "status bar ", there is an additional tag in the lower right corner of the interface. "ln 78, Col 10" indicates "Row 78, column 10", which can be quickly located in the file for ease of explanation. Of course, you can also enter keywords in "edit" and "Search" to quickly locate the problem. Each timeConfigurationFile changes, after saving, must take effect after the Apache server is restarted, you can use the small icon mentioned above to easily control the server to "restart" at any time ".

Now, configure the Apache server, "ln 228", or search for the keyword "DocumentRoot" (that is, the root directory of the website) and find the location shown in, then, change the address in "" to the root directory of your website. Write the address format as shown in the figure. Generally, change the file address "\" to "/" in Apache.

"Ln 253", you can also find"

The specified parameter file name is arbitrary. It is not necessarily set to "index.html", such as "test. php.

Here is an optionConfigurationOption.ConfigurationIt seems that I have corrected it. No.ConfigurationThat is, to force the language encoding of all output files. The HTML file contains the language tag (which sets the document language to gb2312) and will also force the conversion. If the webpage is garbled, check whether the above HTML language mark exists in the webpage. If not, it will be displayed normally after being added. Remove "#" in front of "# defaultlanguage nl" and change "NL" to the language you want to force the output. The Chinese name is "ZH-CN". Save and close the language.

Now, the simple Apache configuration is over. Now, restart with the previous small icon.ConfigurationYour website becomes a website server. If you load a firewall, open port 80 or port 8080, or allow the Apache program to access the network. Otherwise, the website cannot be accessed. If you have a public IP (usually ADSL or dial-up Internet), you can invite all friends who can access the Internet to Use http: // your IP address (IP address query can access http://www.goodwaiter.com, the content in the query is) Your Website. If you do not have a public IP address, you can also tell other users in the LAN through http: // your intranet IP address, visit your website.
II,PHPIn the module mode, PHP and Apache are combined to enable your website server to support PHP server script programs.

Right-click and decompress the downloaded PHP installation file php-5.0.5-win32.zip.

Specifies the decompression location, which is set to "D: \ PHP"

View the decompressed folder and find "php. ini-Dist file, rename it as "php. INI, open edit, find the place in the figure below, ln385, there is a "register_globals = OFF" value, this value is used to open global variables, such as the value sent from the form, if this value is set to "off", you can only use "$ _ post ['variable name'], $ _ Get ['variable name']" to obtain the sent value, if it is set to "on", you can directly use "$ variable name" to obtain the sent value. Of course, it is safer to set it to "off, it is not easy to intercept data transmitted between webpages. If this value is changed to "on", it depends on your own feeling. Is it important for security or convenience?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.