Learn to get the source IP scheme via the OVHcloud API without installing an SSL certificate. This is helpful if you have many domains and SSL certificates.
Requirements
We assume you have already an OVHcloud Load Balancer HTTP configured, if not follow this guide.
You have:
- an OVHcloud Load Balancer service
- Nginx (or Apache with mod_proxyprotocol) on an OVHcloud backend
- A domain (option)
- an SSL certificate (option)
Nginx Configuration
For this example, we use this minimal nginx configuration on each backend.
- Port 80 / 443 are used for direct connexion to backend (for test, management, ...)
- Port 8080 / 4443 are used with LoadBalancer
You can't use ProxyProtocol and HTTP on the same port, and theses protocols aren't cross-compatible.
Infrastructure
Backend# | Public IP | Zone |
---|---|---|
backend_1 | 213.186.0.1 | vin |
backend_2 | 213.186.0.2 | hil |
Configuration
Add backends
Create a new server cluster for each port on backend:
POST /ipLoadbalancing/{serviceName}/http/farm
Parameter | Return 1 | Return 2 |
---|---|---|
id | 1000 | 10001 |
POST /ipLoadbalancing/{serviceName}/http/farm/{farmId}/server
Parameter | Return 1 | Return 2 | Return 3 | Return 4 |
---|---|---|---|---|
id | 2000 | 20001 | 20002 | 20003 |
Add frontend
POST /ipLoadbalancing/{serviceName}/http/frontend
Apply changes
POST /ipLoadbalancing/{serviceName}/refresh
Firewall
Don't forget to allow IPLoadbalancing traffic to your backends:
GET /ipLoadbalancing/{serviceName}/natIp
Go further
For more information and tutorials, please see our other OVHcloud Load Balancer guides or explore the guides for other OVHcloud products and services.