Articles in this section

How to host a static HTML page?

Commit your site's static files to a directory in your project repository, then point your app's yaml configuration to it by defining a web.locations key in your .platform.app.yaml file. The root key should contain the name of this directory, for example, if your files are located in the "public" directory, add this to your app configuration:

web:
    locations:
        '/':
            root: 'public'

You can define where requests to the root domain are sent. Do this by adding an index key which contains a list of file names:

web:
    locations:
        '/':
            ...
            index: ['index.html']

 

For more information on this feature, please see the following page in the Upsun documentation:

https://docs.platform.sh/create-apps/web/static.html 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.