Host a static site with NGINX

On this tutorial we will show you how to :

  • Create a scalable space hosting for your static website (html) with NGINX and FlashDrive
  • Access and edit your files and dependencies (html, images, javascript).

All you need is a free FlashDrive account with the ability to launch at least 2 DEV instances.

1/ Select NGINX from the Marketplace :

2/ Choose a name for your App, a location and a size (DEV it’s ok for tests, choose a larger instance size for production services)

3/ On the next step you will be able to add a domain name for your app, you can leave this field empty if you just want to test the process, FlashDrive will create a temporary domain name for you. On the same page add FileBrowser as addon : we will use it to upload and modify our files :

4/ Check the estimate cost for your app and click “Launch My App” and wait for the process to complete.

5/ FlashDrive created a new stack for your app composed of the NGINX server (that will host your static site) and the FileBrowser :

6/ Click on your website name to see both apps installed :

7/ Click on the filebrowser app to access the settings and attach the disk related to NGINX (usr/share/nginx/html mounted on your app name) :

8/ Click Attach to validate

9/ Click on the FlashDrive URL assigned to FileBrowser to access your files (default login is admin/admin, change the password immediately) :

10/ A index.html is already here, you can modify it, replace it and upload any files or folders your website needs :

11/ Each time you modify a file from the FileBrowser the change is immediately applied to your website.

12/ Now return to your apps and click on the name of the NGINX app :

You will able to see your website and any change you made!

Was this helpful?

0 / 0