Environment variables

Vegvisir has a few environment variables that can be modified to change its behavior.

Copy .env.example.ini to .env.ini and edit the copied file to get started.


Reference

string

root_path

An absolute path to the folder where your project is located.

string

shell_page

A path relative from your root_path to a PHP file that contains a vv-shell element, and will be loaded as the shell of your page.

string

public_path

A path relative from your root_path to a folder containing public PHP pages and other public static assets.

The default for this variable is "public/".

string | null

error_page_path

An optional path relative from your root_path to a PHP file that will be loaded when a page can not be found.

Commenting-out this variable or setting it to null will disable error pages. An empty respone body will be returned.

string

worker_magic_pathname

Vegvisir navigation worker code will be returned when request pathname matches this string

This variable can be left as-is for most applications.

string | null

rfc_4288_url

URL to an RFC 4288 compatible MIME-type file which will be cached (until server reboot) and referenced for serving static assets.

The default for this variable is Apache's httpd MIME-reference.

Commenting-out this variable or setting it to null will disable custom MIME-lists and default to PHP's mime_content_type parser.

bool

display_php_source

Enabling this can lead to sensitive information being leaked from your back-end.

When set to true appending ".php" to the end of any page pathname will return the PHP source for that page in text/plain.

For example, https://example.com/page.php will let the visitor inspect the PHP code for that page.

Commenting-out this variable or setting it to null will default this setting to false.