Please tell me how to write the configuration when https://api.XXX.com implicitly jumps to https://www.XXX.com/api/ with parameters
rewrite ^/(.*)$ https://www.XXX.com/api/$1 permanent;
The reverse proxy can be configured on api..com to point to www..com/api/
server { ... server_name api.xxx.com; location / { proxy_pass www.xxx.com/api/; } }
It is recommended to use nginx proxy and open nginx.conf
Add a new server block
server { server_name api.xxx.com; location / { proxy_pass www.xxx.com/api/; } }
rewrite ^/(.*)$ https://www.XXX.com/api/$1 permanent;
The reverse proxy can be configured on api..com to point to www..com/api/
It is recommended to use nginx proxy and open nginx.conf
Add a new server block