D
David Berger
Guest
Modulus supports seamless deployments of static sites. The static image uses Nginx 1.6.3 with defaults to serve your content with minimal effort. CREATE PROJECT Creating a static project can be done by choosing Static on the web portal or when creating a project using the CLI. The static runtime is minimal; any servo size will be sufficient for your static project. We recommend 396 MB. DEPLOYING The Modulus Static runtime allows you to deploy static assets which will be served using the default server name and configuration. A basic application includes an index.html file that is served as the index (/) route into the application. Static content will mirror the directory structure of the application. CUSTOMIZATION Custom configuration is supported by deploying a sites-enabled directory that contains one or more Nginx configuration files. The configuration files can have any file name you choose. You must override server_name within your configuration for it to be applied. Example custom Nginx configuration: server { listen 8080; server_name myproject-12345.onmodulus.net; ## # Your custom configuration goes here. ## } Modulus provides a default configuration that serves most common static sites. Below is the default server block if no custom configuration is supplied. server { listen 8080 default_server; root /mnt/app; index index.html index.htm; location / { try_files $uri $uri/ =404; } }
Continue reading...
Continue reading...