[Tool installation and use] [Apache] Download and installation of Apache server on Windows

Version: v2.4.33 x64
Environment: Windows10

background:

Since you want to test JSON scripts and the okHttp library, you need to build an Apache server.


download:

Download address:
http://httpd.apache.org/download.cgi

Download the Windows version:
write picture description here

Choose a server:
write picture description here

Download the 64-bit version:
write picture description here


Install:

After decompression, there is a readme_first document to teach you how to install it
.
write picture description here

The specific installation steps are as follows:
Step 1:
cmd enters the \Apace24\bin directory to execute
httpd.exe

If there is no error message and the cursor moves to the next line, the command execution is successful.
Then visit the following pages:
http://localhost

Normally this page will be displayed:
write picture description here

Step 2:
The previous test is completed, now execute the installation
httpd -k install

write picture description here

Step 3:
Start the service and view the port
httpd -k start

write picture description here

You can also see that the Apache service has succeeded in the task manager.

write picture description here

In addition, you can also use the monitor tool in the directory to start the service:
write picture description here
click start:
write picture description here


Apache other commands:

Stop Apache     httpd -k stop
Restart Apache  httpd -k restart
Uninstall Apache Service    httpd -k uninstall
Test Config Syntax  httpd -t
Version Details httpd -V
Command Line Options List   httpd -h

test:

Write a json file under C:\Apache24\htdocs, as follows:
{"id":"1","name":"kris"}

Open the page to see:
write picture description here


refer to:

Download and installation of Apache server

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325987237&siteId=291194637