Modified

There are several kinds of web configuration files:

  • Silk hosting service options control overall the environment of your site. This page is about these settings.
  • Apache web server .htaccess files specify how you want to control access to your site and redirect some pages to other destinations. See the Apache HTTP Server documentation for options with a context of .htaccess.
  • Some programming languages have their own option files.
Silk hosting configuration: .silk.ini files

The top directory of each site can contain a file named .silk.ini (for example, ~/www-root/.silk.ini) containing settings for how the site is hosted. This is a Windows-style INI configuration file with sections designated with square brackets ([myname]) followed by lines of related settings in name = value style. Blank lines and whitespace around the equal sign are ignored. Anything following a # symbol is treated as a comment.

An example .silk.ini might look like:

[general]
max-request-length = 1048576  # allow uploads 1MB in size
document-root = public

[python]
version = 3.14

Changes to this file are reflected in various system services and automatically take effect within a few minutes. If you want to encourage this to occur faster, you can type silk <hostname> update.

General settings: [general]

document-root = <relative-path>
The relative directory under your site root (e.g., public) in which static files will be located. This allows you to move a site’s public files under a subdirectory of the site, preventing direct web server access to other files. This is often required by app frameworks that use a directory named something like public or static..
max-request-length = <integer>
The number of bytes the server will accept from a browser request for your pages. The default is 131072. If you expect particularly large web requests such as large file uploads, you might also want to adjust the request-timeout setting. If you are changing this for a PHP site, you should also consider changing its upload_max_filesize and and post_max_size options in a .user.ini file.
proxy-root = <URL>
For a site proxied to silk through another site such as www.uvm.edu, the URL of the site this one should appear as. This is particularly required to support CAS authentication on proxied sites.
redirect-insecure-http = true | false
Redirect all site pages to from http: to https:. The default is true and should almost always be left alone.
request-timeout = <integer>
The number of seconds the server will wait for a full response from your pages before returning an error to the user’s browser. The default is 40. If you are changing this for a PHP site, you will likely also want to update its related option.

Go: [go]

version = latest
The version of Go to use, currently always latest for the most recent available.

Java: [java]

version = 17 | 21 | 25 | latest
The version of Java to use. The default is 17.

NodeJS: [nodejs]

version = 20 | 22 | 24 | latest
The version of NodeJS to use. The default is 20.

Perl: [perl]

version = latest
The version of Perl to use, currently always latest for the most recent available.

PHP: [php]

All other changes to PHP go in PHP’s native .user.ini file.

version = 8.1 | 8.2 | 8.3 | 8.4 | 8.5 | latest
The version of PHP to use. The default is 8.2.
debugger = none | xdebug
A debugger to enable during code execution.

PowerShell: [powershell]

version = latest
The version of PowerShell to use, currently always latest for the most recent available.

Python: [python]

version = 3.10 | 3.12 | 3.14 | latest
The version of python to use. The default is 3.10.

R: [rlang]

version = latest
The version of R to use, currently always latest for the most recent available.

Ruby: [ruby]

version = 3.2 | 3.3 | 3.4 | latest
The version of Ruby to use. The default is 3.2.

Rust: [rust]

version = latest
The version of Rust to use, currently always latest for the most recent available.

Web apps: [app] or [app: my app name]

If you have multiple apps, each one must have a unique name.

type = golang | java | nodejs | python | rlang | ruby
The programming language used for the application.
uri = <URI-prefix>
A pattern matching the part of a web request URL after the hostname that should match this application, usually ending in *. For example, /* matches all pages, while /myapp* matches all pages that begin with /myapp.
root = <relative-path>
An optional directory under your site root containing all your application files.
document-root = <relative-path>
The directory under your app root in which static files will be located.
startup-script = <relative-path>
The name of the script launching your application, which should have executable permissions (chmod u+x wsgy.py).
jvm-classpath =
For Java apps, an optional list of file paths to class directories or JAR files that should be available to your application.
venv-path = <filesystem-path>
For Python apps, an optional filesystem path to a Python virtual environment containing your application’s module dependencies. The Python command located here will not be used, but the modules will be available to your application.
env.ENVIRONMENT_VARIABLE_NAME = <string>
Environment variables to make available within your application.