kekoke commented on issue #6648:
URL: https://github.com/apache/apisix/issues/6648#issuecomment-1072043781


   Hi @tokers @tzssangglass thanks!
   I am using Docker Compose for APISIX deployment, and using Nginx to proxy 
APISIX, the nginx configuration as below:
   
![image](https://user-images.githubusercontent.com/17831817/158935433-47dda36b-e365-4326-a9b8-e260c5468046.png)
   
![image](https://user-images.githubusercontent.com/17831817/158935964-e910ebd3-9126-4fc0-b6e8-f9eebcaaa333.png)
   
   ```
   server {
           listen       80;
           server_name  apigw-dev.com;
   
           location / {
               proxy_pass http://0.0.0.0:9080; # APISIX admin API
               root   /home/application;
               index  index.html index.htm;
           }
   
           error_page   500 502 503 504  /50x.html;
           location = /50x.html {
               root   html;
           }
   
   }
   ```
   Create route:
   ```
   curl --location --request PUT 'http://apigw-dev.com/apisix/admin/routes/' \
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "id": "sanctions",
       "name": "sanctions",
       "methods": [
           "GET",
           "POST",
           "PUT"
       ],
       "host": "uat-sanctions-api.com",
       "uri": "/*",    
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "uat-sanctions-api.com:80": 1
           }
       }
   }'
   ```
   Created route response:
   
![image](https://user-images.githubusercontent.com/17831817/158941815-96e141bb-5955-4f14-a247-1f4081565652.png)
   
   Test ruote:
   ```
   curl --location --request GET 'http://apigw-dev.com/api/account/info' \
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Host: uat-sanctions-api.com' \
   ```
   Tested route response:
   
![image](https://user-images.githubusercontent.com/17831817/158941272-7cf2570f-eae6-4be7-b77a-51fd8b44fa05.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to