Yesterday when learning the Android XML parsing, want to build a simple Web server on their own computer to hold a piece of XML text, and then in the Android program to parse, find some information, see the Apache server is relatively easy to use, the scope is more extensive, So I decided to use it.
1, download Apache Server installation package, address: http://httpd.apache.org/download.cgi
I chose 2.4.12 this version, on the Apache official website to find a half-day, I think there will be. msi installation package, but never found, OK no no no (want to lazy but did not provide one-click Install package, alas), find files for Microsoft windows this directory, Click I selected is: Apachehaus this site to download, I downloaded the Apache 2.4.x VC11
2. Installation
Unzip the downloaded compressed package to the root of a disk (note: It is best to extract to the root of the disk, I will tell you that I did not extract to the root directory, a lot of effort to the Apache server configuration)
Go to cmd, run command prompt as Administrator
Install Apache service, (note: If your computer does not have the following program to download the Microsoft Official website, installation, Apache compression package Readme.txt also mentioned the need for Microsoft's support for this program, installation documentation is really a good thing):/http www.microsoft.com/en-us/download/confirmation.aspx?id=30679
3, go to the Apache directory under the Bin directory, click ApacheMonitor.exe, then you can start the Apache service. Well, all this seems, it seems that there is no difficult, all carried out very smoothly ah, the following talk about the tragic experience of bloggers, I hope we will not go to the next installation of so many long way.
4. The tragic experience of the bloggers
Talk about the tragic experience of bloggers, let everyone happy happy, life has been so difficult, always do not forget to smile ....
At the beginning of the Bo Master Download good compressed package, unzip it in the E:/program files/directory, that is, no decompression in the disk with the record, and then follow the above steps, step by step, all ready after, thought everything is OK, but how can not start Apache service , always error: Windows cannot start Apache services locally (for a long time without remembering). Bloggers on-line search, found that many people have this problem, it boils down to three kinds:
1, 80 port occupancy (bo Master carefully searched several times, to determine the 80 port is not occupied, pass)
2, the TCP/IP protocol LMHOSTS the front of the hook removed (also tried, completely useless, pass)
3, the httpconf in the ServerAdmin commented out (also tried completely useless, pass)
Spent two hours, the problem has not been solved, one o'clock in the morning more, sleepy, sleep, the problem has not been solved, sleep is restless heart (do not know programmers are so, the problem is not solved, sleep is not good, alas, hopeless ...). )。 The next day, get up early in the morning and then find a way to finally see two foreigners on YouTube video. is the Apache installed in the root directory of the disk, anyway, have tried so many ways, more is a no matter, did not think unexpectedly a bit better. In the browser address bar input localhost, finally appeared the following interface, it is not easy AH
5. Summary
Write this blog one is a record of their own sad experience, and the second is to help the Bo friends need help, do not go the old way Bo master.
Important thing to say three times: Apache best placed in the root directory of the disk! Apache is best placed in the root directory of the disk! Apache is best placed in the root directory of the disk!
Android Development--apache Server installation, troubleshooting Apache service cannot start the problem