= VV::include("modules/snippet/Snippet.php") ?>
In this guide we will be installing Vegvisir on a Debian-based system with NGINX as the web server. The process should be similar for other configurations as well. Let's start by cloning Vegvisir to a folder. The code for Vegvisir will be separate from the code for your project. I have cloned this into the folder Vegvisir only has one dependency, let's We will be pointing a virtual host to the Since your project files will live in a different directory, this can be set-and-forget. We're almost done here. We want to create a separate folder which will hold our project files. Let's create a folder Now let's finish up by pointing Vegvisir to the folder we just created. Make a copy of the There is only one line we need to change inside the Change the value of this variable to an absolute path to your project root folder. In our case it will be That's all there is to it. Restart your webserver if you haven't and navigate to your published website. If everything worked correctly, you should see a default landing page with a summary.Installation
Prerequisites
Step 1: Clone the repo
/var/www/vegvisir
but you can put it wherever you want.Step 2: Install dependencies
cd
into our folder and install it with Composer.Step 3: Configure virtual host
/public/index.php
file from the Vegvisir root directory.Step 4: Create project folder
/var/www/my-website
as an example - you can put this wherever you want!Step 5: Point Vegvisir to project folder
.env.example.ini
file from Vegvisir's root directory and place it in the same spot as .env.ini
.env.ini
file we just created. It should be the top most variable called root_path
./var/www/my-website
.Done!
Vegvisir will automatically serve anything that isn't a .php
file under /public
in your project directory as a static asset. You can for example put your robots.txt
file under /public/robots.txt
and it will be returned as a text/plain
document.
While this works fine for smaller assets, they still have to be passed through the PHP CGI. This process is a bit slower than serving assets with your web server directly - and might be a lot slower for larger files.
To fix this, let's add an optional location
block to our NGINX configuration which will handle assets. The process should be similar for other web servers - contact me if you need help.
Let's add the following location
block to our NGINX virtual host that we set up in Step X.