Learn how to configure your website and the OVHcloud Load Balancer to enable HTTPS.
OVHcloud Object Storage can host a static website inside an Object Storage bucket.
A static website contains only static content (HTML pages, images, videos, client-side scripts), whereas a dynamic website relies on server-side processing to process data and help render content.
However, OVHcloud Object Storage static website hosting does not support HTTPS. If you want to use HTTPS, you can use OVHcloud Load Balancer to serve a static website hosted on OVHcloud Object Storage and act as an SSL gateway.
Requirements
- An OVHcloud Load Balancer, which will serve the role of an SSL gateway and can offer protection against DDOS attacks
- A registered domain name
- You need to order a TLS certificate associated with your domain name at OVHcloud (optional if you already have a trusted TLS certificate associated with your domain name)
- You have to enable web hosting on your Object Storage bucket
- Access to the OVHcloud Control Panel
Instructions
Step 1 - Configuring the Load Balancer
Step 1.1 - Add your certificate
From the OVHcloud Control Panel, navigate to the Load Balancer
section via the Network
menu.
Choose the SSL certificates
tab, then click Add an SSL certificate
.
Optionally, you can also order a free certificate.
On the next screen, fill in the fields and click Add
.
Step 1.2 - Configure a server cluster
You now need to configure a server cluster and add it to your Load Balancer. A server cluster is a pool of backend machines that will handle the workload.
Still from the Load Balancer section of the OVHcloud Control Panel,
click the
Server clusters
tab, then click
Add a server cluster
.
Enter the configuration of the new server cluster...
- Name (optional)
- Protocol: HTTP
- Port: 80
- Datacenter: Choose the region in which you have hosted your website
...and click Add
.
You now need to add servers to your server cluster. Click the
Add a server
button.
Enter the configuration information of your server:
- Name (optional)
-
IPv4 address: Enter the public IP associated with your static
website default
URL in the form of
{bucket}.s3-website.{region}.io.cloud.ovh.us
You can retrieve this IP address by doing a dig command on the URL.
Example: using dig command
Example: using host command
Step 1.3 - Configure your front-ends
The next steps consist of adding front-ends to your Load Balancer. A front-end will be the internet-facing element of your Load Balancer and is responsible for handling and routing incoming requests.
In the Load Balancer section of the OVHcloud Control Panel, click the Front-ends
tab, then click Add a front-end
.
Add two frontends:
- One frontend whose sole purpose is to handle all incoming HTTP requests and redirect them to your domain name in HTTPS
- name (optional)
- protocol: HTTP
- port: 80
- datacenter: all
- default server cluster: none
- advanced settings > HTTP Redirection:
https://<your_domain_name>
- One frontend that will handle all incoming HTTPS requests and perform the role of the SSL gateway
- name (optional)
- protocol: HTTPS
- port: 443
- datacenter: the region where your bucket sits
- default server cluster: the server cluster previously created
- certificate: the certificate that you created
- advanced settings > HTTP Header: Host
<default_website_url>
in the form<bucket>.s3-website.<region>.io.cloud.ovh.us
Step 1.4 - Apply changes
Once you have created and configured all the resources, do not forget to click the Apply configuration
button to apply all the changes to the Load Balancer.
Step 2: Configure your DNS
Edit the two A records to add the public IP address of your Load Balancer.
NOTE: Check with the provider of your external domain for instructions to do this.
You can find the public IP address of your Load Balancer on the home page of the Load Balancer
section in the OVHcloud Control Panel.
Step 3: Test your website
Check that the website and the redirect work properly. Open a private browser to ensure that you have a clean cache and type your domain name.
Example:
Go further
How to configure your OVHcloud Load Balancer
For more information and tutorials, please see our other Object Storage support guides or explore the guides for other OVHcloud products and services.
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.
*S3 is a trademark filed by Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.