dasper
dasper

Reputation: 722

Vagrant/PuPHPet mod_alias in config file

I am looking to add an alias in a few of the vhosts in a new vagrant deploy. I am seeing in the documentation that it should be supported but every attempt I have made to add it to the config.yaml file does not seem to work.

Any information that can point me in the proper direction is greatly appreciated.

Here is the documentation I am referring to:

https://github.com/puppetlabs/puppetlabs-apache#aliases

Here is what I am trying to inject into the vhost:

Alias /api "/var/www/api/"
<Directory "/var/www/api/">
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</Directory>

Upvotes: 0

Views: 352

Answers (1)

Alex Kalmikov
Alex Kalmikov

Reputation: 2163

Best way is to drop your config.yaml to their website. Then go to https://puphpet.com/upload-config#webserver Use either

Custom Directives (inside <Directory> block)

Or

Custom Directives (outside <Directory> block)

Just put inside yours

Alias /api/ /var/www/api/

It would output in your config.yaml

custom_fragment: 'Alias /api/ /var/www/api/'

I guess you can use it manually also.

Upvotes: 1

Related Questions