How to create a static website
Estimated time to read: 2 minutes
In this tutorial you will learn how to create a static website using Swift on Fuga Cloud. Static websites are more secure, the website loads faster and are highly scalable.
For this tutorial you need the following:
- Active Fuga Cloud account.
Step 1 - Create Team credentials.
- Login to your Fuga Cloud account and go to Access > Credentials. Select on the op of the screen Team credentials. Create a new Team credential by clicking on the orange Team credentials + button.
- A window will appear with the credentials Username and Password, securely store the password in your password manager click on ‘Ok’.
- After creating the new Team credentials, click on ‘OpenRC’ and download the file on your device.
Step 2 - Create Object Store
Open your CLI client and follow the instructions below:
- Source the OpenRC file:
- When prompted, enter your previous saved password:
- Instal the swift client on your machine.
- Create a container with public read access rights:
- Upload your html file:
- Set an index file directive:
- Turn on listing and set public read access rights:
- Upload your html error file
- Set an error file:
Step 3 - Connect to the website
Go to the Fuga dashboard and go to Storage > Object store. Find your container and click on the three dots "...", and click on 'View Details'. You will get the information of your Container. Copy the Swift URL and past it in your browser to connect with your Static website.
Below you can see an example of an URL:
An alternative address is also available with the following URL syntax:
In this tutorial you have learned how to set up your team credentials, upload your
index.html file and set up a static website in Fuga Cloud.