An initial LAMP stack for Vagrant.
Provisions a base Linux VM to run an Apache web server and MySQL database server, with PHP support. Uses the following:
- CentOS 7
- Apache 2.4
- MariaDB 5.5
- PHP 5.4.16
- Make a
secrets.cfg
file:
$ cp .provision/secrets/secerts.cfg.example .provision/secrets/secrets.cfg
- Update
secrets.cfg
with a rootDB_PASSWORD
. - Spin up the VM:
$ vagrant up
$ vagrant ssh
Two virtual hosts are included at startup as an example of how Apache can server multiple hosts with the same instance.
SSL is enabled by default. The bootstrap script follows recommendations from Configure Apache Web Server on Amazon Linux to use SSL/TLS to make the server more secure.
Use HTTPS with the initial sites for secure traffic.
- phpMyAdmin
- WP-CLI
https://192.168.33.10/phpinfo.php is active by default to demonstrate PHP being properly installed.
After verifying, you may want to remove this file (/var/www/html/phpinfo.php
) for security reasons.
This setup adds example.com
as a virtual host. Edit your local hosts
file to point this domain to your VM's IP:
# Vagrant Domains
192.168.33.10 example.com
Set up additional virtual hosts in /etc/httpd/conf.d/
, a la example.com.conf
.