How to use this box with Vagrant:

Vagrant.configure("2") do |config|
  config.vm.box = "JoSSte/lamp"
  config.vm.box_version = "2.0.0"
end
vagrant init JoSSte/lamp \
  --box-version 2.0.0
vagrant up

This version was created about 2 years ago.

Ubuntu 22.04 Jammy PHP 8.1

Vagrant LAMP box

This is my gold image for working with apache and PHP

Information

This .box is meant as a golden image for building LAMP environments to facilitate rapid development on several machines. The goal is to have a box with apache, php, mysql, xdebug installed and configured, as well as modsecurity preloaded to be enabled quickly if you need that installed.

Debugging in Visual Studio Code

Make sure your .vscode/launch.json contains this:

{
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "pathMappings": {
        "/var/www/<yourfolder on vagrant>": "${workspaceRoot}/src"
    },
    "port": 9000,
    "log" :  true
}

MySQL

  • Set up to listen on port 3306 on all ips
  • no ports forwarded as default
  • User: vagrant
  • Pass: secret
1 provider for this version.
  • virtualbox
    unknown Hosted by Vagrant Cloud (817 MB)