How to install the php + apache server

Source: Internet
Author: User
Tags comments php script win32 dreamweaver

Rewritten dudeman, preliminary indication of S/Sergeant, crawler | August 19, 2004
Do you want to set your own bandwidth/disk space limit only for the appropriate price in the network hosting plan? So technically, now you can... but it is entirely up to you to keep it. In such a short and easy tutorial, we will set up a local server that only we can access (currently ). There are only three steps. This should only take us about five minutes!

You will need to download: PHP 5.0.0 compressed package (7 mb) and apache_2.0.50-win32-x86 no_ssl.msi (6 m level 3)

This is our goal... to create a Web server function:

 

[For example, you will see that Apache is correctly installed]

Step 2-everything is organized in a neat and orderly manner
The subsequent teaching courses will assure you of the Windows network server for your job! (Test WinXP)

Let's use our root directory to accommodate all our network applications so that they can access the style at any time. Make a folder in your local drive called 'network '. I used the C drive as an example.


 
[Shorten my C drive]

Heh... excellent completion of step 2. We have just set up the region basis and we will close the work. The first step is to make it easy in the next two years.



Continue to enhance two-install A pache2. 0.50

Let's use it.

Step 2-installation rating
Okay. Open Apache installation (apache_2.0.50-win32-x86 no_ssl.msi) and whistling's common choice, they throw you until you see a strange square like this:



[This is what your form looks like should use the correct information]

Replace the 'domain 'and 'server name' with 'local', and the 'Postmaster's email. You can fill in anything you want. It is strongly recommended that you select "for all users, port 80", because the building tutorial is like this.

What we did just now is to tell us that the DNS (domain name system) of the Apache server is 'local '. The local IP address is your internal IP address (Internet Protocol), 127.0.0.1. Only you can access the IP address 64.207.129.18, which is the same as the physical project www.kirupa.com. We want to install Apache web' in our root folder, which uses 'http: // localhost/'as a pointer. Sound confused? Well, this is the most messy part, tutoring!

Press the future, and continue to install directory level you must change from C: Program Files Apache Group to C: website. Once again, please note that we only use drive C as a reference and can install it anywhere. This tutorial is applicable to drive C.

Create a score

Click the Apache icon, and you will see a green light on the task tray (purple feathers and the "remove" button), indicating the successful installation:

 
[Green Light! ]

Of course, the installation is not done, if you:


  
[Red light:/]

Let's make a quick change to the configuration file. Open & ccedil;: Network confidence httpd. conf file and search "listen to 80 ". Replace with "Listen to local: 80", so it will be centrally connected to port 80 (web browser default) only for you. Now, dedicated!
  
Next, search for "localhost" until "server local: 80" is found ". Make sure that it is one set, because the website without our pointer 'local' cannot be accessed.
  
Now let's test. Open your browser and enter http: // localhost/
If your webpage appears in this tutorial, then your settings.
 

Note that the-W eb server is the entire local area network.
If you want your network server to provide your entire LAN, then go to the beginning of your own,> "run," command, and type "ipconfig ". You should be like:
IP address. . . . . . . . . . . . : 192.168.1.3

Now jump back to step 2 to "listen to 80" instead of "listen to local: 80" and delete 'local: 'from "server local: 80" in step 3 ". For example, for me, this would be "listen to 80" and "server 192.168.1.3: 80 ". Enter http: // yourIP/from the network of another computer.
 
 

Nice job. Let's enter the final stage in advance.

We are in the family extension... and this time there is no doozie

Step 2-install P HP
You downloaded the compression, didn't you? If you do not have one, jump back to page 1st.

Okay. To speed up our previous few minutes, I uploaded the php. Ini file you extracted and generated at your Windows Root. Apache must be able to access it. For Windows 98/ME/XP, it is C: Windows and Windows NT or its C: WINNT in 2000.

If you do not have a C drive for this tutorial, you must open php. ini and find the drive that + replaces all matching "C:" results. Do not forget to change Windows to WINNT if you are using NT or 2000, because this is the XP box generated here.

Open PHP-5.0.0-Win32.zip and extract all of this to C: Web PHP.

PHP integration to Apache

Remember our Apache configuration file? Open & ccedil;: Search for "LoadModule" again in httpd. conf ". You will see comments and # characters in a group of modules. Paste in:
LoadModule php5_module "C:/web/php/php5apache2. dll"
Continue, look for this: "# AddType text/HTML. Shtml ". Next, location:
Apply for/for AddType X httpd-PHP. PHP
Apply for/for AddType X httpd-PHP. Limited

We just told Apache about the analysis. Php files, instead of downloading them because it is an unknown extension.
The last but not least, let the configured index.php be an effective directory reference, such as index.html. Search:
DirectoryIndex index.html. var
And change the compliance:
Index. php index.html. var of DirectoryIndex
Save and close the httpd. conf file. After Apache is started, click the service to monitor your task tray and navigate to the 'restart' button.
Inhale ate and breath. You just finished building your own network server in a preliminary stage, with style.
Want to test it? Better off, 'Hello, the world won't hurt.

PHP test file
Open Notepad or your favorite web editor. For me, I will use Dreamweaver. Keep in mind that PHP is a server-side script, so 'what, what you see, what you get will not help you a lot here.

In Notepad, or codebox press the F10 key if you use Dreamweaver as follows:

"? PHP
$ Time = Time ();
$ Thetime = Date ("1, Jiangsu f y g: accept ya", $ time );
Echo "Hello world! ". $ Thetime .".";
? "

Save it as "hello. php" and load it in the C: Network Apache htdocts. It can load the input http: // localhost/hello. php.

Please note-equivalent to attribute 7 77
To allow you to read and write your script, you need to "change the mode. You may ask, since you do not have an FTP server running, you only need to attribute 777 (full use. Really, all you have to do is right-click the PHP script and file under the Directory to be modified (only the entire htdocs), and go to performance-> "Security-> ", and allow all users to click the left column to allow each option (read, write, and so on)
 

Just because of the big S/Sergeant, crawling the Quakenet who taught me how to fix mIRC above Apache incorporated into PHP (my Internet Relay Chat) and retrospek on Efnet who explains properties on Windows. Really, I don't know anything about it, because I am a project working on the internet and I don't want to think about the mountains that make Web servers.

Please note-set up a server for the entire network
If you are running an XP Firewall (well, I think these conditions should at least), you need to add an exception, firewall port 80 LAN connection. In the properties dialog box, select LAN connection to the Advanced tab> "set to Windows Firewall. Then, in the new dialog box, click "Add port..." to add port 80.
-B igmtnskier
 
 

If you have any questions or comments, you can reach my Gymnasium. Because I have a lot of infrequent forums, they are integrated with MSG in irc.alternatenet.net. This does not mean that the forum is not helpful, and there are tons of geniuses that are beyond my approach above what I sound like! So don't forget to check them. If you need them, click the link at the bottom.

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.