Running and Verifying ATS
The following describes how to run and verify the ATS when the local host is used as an ATS backend object.
- Change the backend address and port number in the configuration file for the reverse proxy test.
The local Nginx is configured as the backend object. The default Nginx port number is 80, and the default ATS port number is 8080.
- Configure a cache policy.
- Open the cache.config file.
1vim /opt/trafficServer/etc/trafficserver/cache.config - Press i to enter the insert mode and add the following content to the file:
dest_domain=localhost ttl-in-cache=1h
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the cache.config file.
- Configure a request forwarding policy.
In the /opt/trafficServer/etc/trafficserver/remap.config file, configure all received requests to be forwarded to the origin server.
- Open the remap.config file.
1vim /opt/trafficServer/etc/trafficserver/remap.config - Press i to enter the insert mode and add the following content to the file:
map / http://IP:PORT/
- In the URL, IP indicates the actual IP address of the Nginx deployment environment, and PORT indicates the HTTP server port number of Nginx.
- The local Nginx is configured as the backend object. The default port is 80. (In this document, the port is changed to 10000. You can also use the default port.) The default port of ATS is 8080.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the remap.config file.
- Configure a cache policy.
- Start Nginx.
1 2
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf ps -ef | grep nginx
- Start ATS.
- CentOS:
1trafficserver start - openEuler:
1 2
ln -s /etc/openEuler-release /etc/redhat-release trafficserver start

Related commands:
- trafficserver start: starts the trafficserver.
- trafficserver stop: stops the trafficserver.
- trafficserver restart: restarts the trafficserver.
- traffic_top: shows trafficserver cache information.
- trafficserver status: shows the status of the traffic server.
- CentOS:
- Verify ATS using either of the following methods:
- Method 1: In the address box of the browser, enter http://IP:PORT. The test page of the backend service is displayed.

In the URL, IP is the actual IP address of the ATS deployment environment and PORT is the HTTP port number configured in the /usr/local/nginx/conf/nginx.conf file.
- Method 2: If the access with the browser fails or the local IP address cannot be pinged, run the curl command (127.0.0.1 is the local IP address of ATS and 8080 is the ATS port).
1curl http://127.0.0.1:8080
If "Welcome to nginx" is displayed, ATS is verified successfully.
- Method 1: In the address box of the browser, enter http://IP:PORT. The test page of the backend service is displayed.
Parent topic: ATS Porting Guide