Introduction
With any front-end service like CDN or IP Load balancing in front of your services, the IP of your clients is hidden by this service.
You'll only see the private IP in your log, and we'll fix this.
Warning
You need to restrict access to your web services from the OVHcloud Load Balancer.
With this API call you can get IP Range of your servers:
GET /ipLoadbalancing/{serviceName}/natIp
Headers
X-Forwarded-For
The following header should be inside the IP of your client.
Apache
Nginx
X-Forwarded-Proto
You can also get the scheme used by your client to reach the OVHcloud Load Balancer. This is helpful to redirect HTTP to HTTPS.
Apache
With htaccess, you can redirect your customers in HTTPS.
Nginx (best)
With Nginx, it's best to use a entire VHost to redirect HTTP to HTTPS.
Send headers to PHP
Apache
Nginx
With RealIP module.
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.