Code Monkey home page Code Monkey logo

vagrant_lamp_server's Introduction

Vagrant_LAMP_server

Vagrantfile, shell provisioner, Apache conf file, and directory structure for a basic LAMP (Linux, Apache, MySQL, PHP) server.

System Requirements

To use this Vagrantfile you will need a basic Vagrant setup. This includes Vagrant and a VM provider, such as Oracle's VirtualBox. For more information on how to use Vagrant, see the Vagrant Getting Started page. You will also need root user (sudo) permissions to launch the VM, as we are assigning a custom hostname.

Configuration

Directory Structure:

Root Folder (This is the main folder for the project and can be of any name that you choose.)
|
- /public_html (This folder contains all the files for your site.)
|
- /conf (This folder contains the Apache .conf file for site configuration.)
|
- /vagrant (This folder contains the Vagrantfile and lamp.sh provisioner file.)

Project Name:

By default the site will be named lamp.dev. If you wish to change this to a different name (e.g. my-site.dev) you must change every reference to lamp.dev in the following files to the custom name:

  • /conf/lamp.dev.conf Filename must be changed to the new name (e.g. lamp.dev.conf becomes my-site.dev.conf)
  • /vagrant/Vagrantfile
  • /vagrant/lamp.sh This filename must be changed as well.

To accomplish this task is do a search and replace through the above files for 'lamp' and replace with your chosen project name.

Setup

  1. Clone or download the ZIP archive of this Git repository to your project folder.

  2. Open your console go to the vagrant directory of the project. Type $ vagrant up. This will load the Vagrant VM with a 64-bit Linux Ubuntu machine. The console will ask for your sudo password to set the custom hostname.

  3. Once the VM has finished loading open your web browser and navigate to 'http://lamp.dev'. You should see a basic webpage that says 'Welcome to Vagrant!' and the current time in GMT. To stop the server enter $ vagrant halt into your console while in the /vagrant directory. You can also enter $ vagrant destroy to completely remove the VM from your system.

vagrant_lamp_server's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.