« prev :: next »


To use phpVirtualBox, I need to install some prerequisite software:

sudo apt install nginx php-fpm php-soap php-xml -y

I move to /var/www and download the latest release of phpVirtualBox:

sudo wget https://github.com/phpvirtualbox/phpvirtualbox/archive/develop.zip
unzip develop.zip
mv phpvirtualbox-develop/ phpvirtualbox
cd phpvirtualbox/
cp config.php-example config.php

Edit the config.php, changing the password to the password for vbox (in my case, replaceme). Remember, if you ever change the password for the vbox user, you’ll need to change this one too.

Next, we’ll need to configure nginx.

cd /etc/nginx/sites-available/
cp default default.orig

Next, modify the default file. Here’s the contents:

server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/phpvirtualbox;

	index index.php index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
		try_files $uri $uri/ =404;
	}

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
	}
}

With this complete, restart nginx:

sudo systemctl restart nginx

Now you should be able to connect to the HTTP server on port 80 and manage VirtualBox. (The default credentials are admin :: admin. You should change them.) Make a snapshot. Call it phpVirtualBox installed.


« prev :: next »