Skip to content

Instantly share code, notes, and snippets.

@Andrewglass1
Created June 5, 2012 14:08
Show Gist options
  • Save Andrewglass1/2875231 to your computer and use it in GitHub Desktop.
Save Andrewglass1/2875231 to your computer and use it in GitHub Desktop.
mark's apache workshop

working with the vagrant we configured yesterday

configure the port redirects in your vagrant file config.vm.forward_port 80, 8080

run vagrant vagrant up

log into vagrant vagrant ssh

you are now in the virtual box. install apache

sudo apt-get install apache2

Try running curl:localhost:8080 from your mac terminal, it should launch an "it works" page

To launch a static page. From your vagrant:

cd /var/www/

make a directory

sudo mkdir static

create the index file

sudo touch index.html

edit the file

sudo pico index.html
(verdi... cntrl-o, cntrl-x to save/exit pico)

open apache sites-available configuration

cd /etc/apache2/sites-available/..
sudo pico default

change the DocumentRoot line to

DocumentRoot /var/www/static

so it knows to look for the file we just made

exit and vagrant reload

when you reload, you should see your new static html on port 8080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment