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:
Choose a server:
Download the 64-bit version:
Install:
After decompression, there is a readme_first document to teach you how to install it
.
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:
Step 2:
The previous test is completed, now execute the installation
httpd -k install
Step 3:
Start the service and view the port
httpd -k start
You can also see that the Apache service has succeeded in the task manager.
In addition, you can also use the monitor tool in the directory to start the service:
click start:
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: