"PHP Learning to teach" (02.apache+php environment Configuration-Previous) _php tutorial

Source: Internet
Author: User
Tip: If you have not downloaded the relevant software, please first go to the opening tutorial Oh!

must-see: If you have already installed an IIS server, go to the Web site--Internet Information Services (IIS) Manager--, administrative tools, start-up, and so on. Doing so will cause Apache to fail to start.

prev: Install Apache server

Locate the downloaded Apache_2.2.3-win32-x86-no_ssl.msi file and double-click to install it.

Apache Installation Interface ·

(Steal lazy, from the Internet to find a few pictures ready for use, hehe)

The first step:Needless to say, everyone knows, of course, the "Next" button.
Step Two:Point "I accept the terms ... (agreement) "then click" Next "button.
Step Three:At this point you will see the Apache server instructions and click on the "Next" button again.
Fourth Step:Finally see a need to input the interface, such as:

The above three input baskets are: domain name, server name, Administrator mailbox. Because we are installed locally, so this love to fill in your own taste to fill it. If it is a live ammunition server, then pay more attention to the next. The first basket "Network domain" domain name information, fill in the domain name of your server here, if you have already applied for domain name, fill in the domain name that you apply for, (note here to fill in is domain name, only you apply to the complete domain name of the second part, not including "www". If you're applying for a level two domain name, it's the first one. The next part) if not yet, put the IP of the machine to fill up on the line. The next basket is the server name, which fills in the full domain name or IP address. The next basket is the administrator email address. These three items are required for installation, but you can change them at any time after the installation is complete, so you don't have to worry about filling in the wrong place. The last option represents the use of 80 or 8080 ports, which is generally not required (we'll use the default port of 80 for good). Well, say too much nonsense, ignore it, fill out and then click on the "Next" button.

Fifth Step:Here are two options typical (typical installation) and custom (customized installation), to save time, we choose Typical, click "Next" button.

Sixth step:You will see a "change ..." button that you can use to make changes to the Apache installation directory, the default installation directory is C:\Program Files\apache Group This is the same as you like, the default or, their own directory installed, the impact is not big. For ease of interpretation, we use the default directory here. Click the "Next" button.

Seventh Step:Ready to install, just click the "Install" button to install it.
Apache installation Process ·

Complete the installation by finishing the "Finish" button.
OK, now to your Start menu, click: Apache HTTP Server 2.2.3-> Control Apache server-> start
This step is to start the server.

God bless, now we're going to start testing whether the installation was successful. Open the browser, enter in the address: http://localhost or http://127.0.0.1 If you can see the following interface, it means that the installation was successful. Otherwise...... Try it again. Good luck, please.

If you have a successful installation, then do it. Now we need to simply configure the Apache server and locate the PHP file. Generally put PHP folder directory for C:\Program Files\apache Group\apache2\htdocs Let's do a test, write an HTML file, enter the following code:
Program code


<title>Hello World</title>

Hello World





Save the file as "hello.htm" and copy it to the C:\Program files\apache Group\apache2\htdocs directory, open the browser and enter http://localhost/hello.htm to see the output. That is to say Htdocs folder is specifically used to store Web site files, of course, we can also modify him, the following in order to facilitate the management of Web site files, please join me to modify.

We assume that the site files are placed in the D:\PHProot directory, then go to the D disk to establish the Phproot folder, and then open in Notepad C:\Program files\apache group\apache2\conf Directory under the httpd.conf file, locate:
DocumentRoot "C:/Program Files/apache group/apache2/htdocs"
Replace upstream with downstream:
DocumentRoot "D:/phproot"

Note: The use of the oblique bar "/" instead of "\" Beware of confusion. Otherwise, an error may occur.

Then write an HTML file with the following code:
Program code


<title>Oh Yeah</title>

Oh Yeah





Save the file as "yeah.htm" and copy it to the D:\PHProot directory, open the browser, and enter http://localhost/yeah.htm to see the output. If the page shows "Oh Yeah" then the configuration is successful, then, good luck to everyone.

Finally, the installation of Apache, in the "apache+php environment Configuration-Medium", I will detail the PHP installation method and configuration method. I hope you will gain some of this in this tutorial. Don't forget to follow Www.hetty.cn's latest tutorials.

--Hai (Hetty)

Click here to download the World document for this tutorial

http://www.bkjia.com/PHPjc/317438.html www.bkjia.com true http://www.bkjia.com/PHPjc/317438.html techarticle Tip : If you have not downloaded the relevant software, please first go to the opening tutorial Oh! Must-see: If you have installed the IIS server, go to: "Start-Program-management tools-in ...

  • 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.