1. nginx+tyk (tyk still uses http, nginx uses https+proxy_pass forwarding)
Test is feasible
2. Tyk configuration file configuration uses https
Reference link: https:/ /github.com/TykTechnologies/tyk/issues/181
1. Modify the configuration file: /opt/tyk-gateway/tyk.conf
Modify the port to 443
Modify the hostname to: mydomain.com
Add configuration:
<span>"http_server_options": { "use_ssl": true, "server_name": "*.mydomain.com", "min_version": 2, "certificates": [ { "domain_name": "*.mydomain.com", "cert_file": "/opt/tyk-gateway/ssl/mydomain.crt", "key_file": "/opt/tyk-gateway/ssl/mydomain.key" } ] }</span> Copy after login |
Modify under tyk_api_config Host is https://mydomain.com
Modify the Port under tyk_api_config to: 443
Then, restart all services of tyk
The above introduces the TYK configuration SSL solution, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.