If you encounter issues when you access an accelerated resource after you configure ESA acceleration, you can bypass ESA and access the origin server directly. This lets you compare the access performance with and without ESA acceleration to identify whether the issue is caused by the origin server.
Procedure
Use one of the following two methods to test the connection:
Modify the hosts file
You can modify the hosts file to point a domain name to the origin server. This method does not change your DNS resolution.
Edit the hosts file.
When you access a domain name in a browser, the browser first checks the hosts file for the IP address. If the hosts file does not contain an entry for the domain name, the browser queries the local DNS server.
In Windows, the path of the hosts file is:
C:\Windows\System32\drivers\etc\hostsIn Linux, the path of the hosts file is:
/etc/hosts
Add an entry to the end of the hosts file. Use the format
origin IP address domain-to-test. For example:192.168.0.1 example.aliyundoc.comRun the following command in a command line interface to test the domain name. Confirm that the command returns the IP address
192.168.0.1.ping example.aliyundoc.comClear your browser cache. Restart the browser and access the website. The browser now retrieves data from the IP address
192.168.0.1and does not use the ESA acceleration feature.NoteIf the browser returns an error, it indicates a problem with your origin server.
Use cURL to send an HTTP or HTTPS request to the origin server
You can use the cURL tool to send an HTTP or HTTPS request directly to the origin server for testing. In the following examples, 192.168.0.1 is the origin IP address and example.aliyundoc.com is the domain name to check.
If you do not have cURL installed, see the official cURL documentation for installation instructions.
On Windows, you can run the
curlcommand in a command line window. On macOS or Linux, you can run the command directly in the command line interface.
If the origin server uses port 80, run the following command.
curl -voa "http://example.aliyundoc.com/" -x 192.168.0.1:80If the origin server uses port 443, run the following command.
curl -voa "http://example.aliyundoc.com/" --resolve example.aliyundoc.com:443:192.168.0.1If the origin server uses a custom port, run the following command.
curl -voa "http://example.aliyundoc.com/" -x 192.168.0.1:[$Port]NoteIn the command, `[$Port]` represents the custom port number.