Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add A New Virtual Host to Apache on PUPHPET generated Wheezy VM

I used puphpet.com to quickly set up a Wheezy VM. The VM works great but I'd love the add another virtual host to Apache.

According to the puphpet documentation:

I have completely rewritten PuPHPet to take advantage of a built-in configuration tool for Puppet called Hiera. Simply look inside your downloaded folder and open puppet/hieradata/common.yaml. This is the magical file that controls everything!

However my download doesn't include the puppet/hieradata folder nor the common.yaml file.

I tried creating the above folder and files, but they aren't acknowledged when executing vagrant reload.

like image 901
Jeemusu Avatar asked Feb 13 '14 06:02

Jeemusu


2 Answers

I need to spend a day or two to go through and update my out-of-date documentation!

The yaml file is now in puphpet/config.yaml

Search for the vhost key and copy/paste any existing one and change the key.

Then run $ vagrant provision and you'll be all set!

like image 94
Juan Treminio Avatar answered Sep 20 '22 19:09

Juan Treminio


You can do this in a two diffrent ways:

Edit your puphpet/config.yaml and add another vhost.

puphpet/config.yaml:

asxnyytgdo1d: (remember to change this key)
            servername: temp.krzysiek
            docroot: /var/www/temp
            port: '80'
            custom_fragment: ''
            directories:
                6ecw5mx7fg1d: (change this aswell)
                    provider: directory
                    path: /var/www/temp
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - 'all granted'
                    custom_fragment: ''
            ssl_cert: ''
            ssl_key: ''
            ssl_chain: ''
            ssl_certs_dir: ''

OR

Go to https://puphpet.com and Drang'n'Drop your puphpet/config.yaml file, add vhost then redownload.

THEN

run vagrant reload --provision

https://docs.vagrantup.com/v2/cli/reload.html You don't modify directly Vagrantfile but Vagrantfile reads puphpet/config.yaml.

Vagrantfile:

configValues = YAML.load_file("#{dir}/puphpet/config.yaml")

After you should see changes.

like image 40
Krzysztof Boduch Avatar answered Sep 19 '22 19:09

Krzysztof Boduch