T
T
thatside2015-03-08 15:50:42
Puppet
thatside, 2015-03-08 15:50:42

How to add additional Apache virtual host options when working with Vagrant via Puphpet?

To simplify development, I use a virtual server through Vagrant. Accordingly, I prescribe virtual hosts for apache. The problem is that I can not prescribe additional parameters for redirection (RewriteRule and others like them) in any way.
config.yaml now looks like this:

vhosts:
        afatopgzgmoa:
            servername: insta.local
            serveraliases:
                - www.insta.local
            docroot: /var/www/insta
            port: '80'
            setenv:
                - 'APP_ENV dev'
            directories:
                oa0olsvnaa3z:
                    provider: directory
                    path: /var/www/insta
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - all
                        - granted
                    custom_fragment: "RewriteEngine on
                                      RewriteCond %{REQUEST_FILENAME} !-f
                                      RewriteRule ^(.*)$ web/app_dev.php [QSA,L]"

But at the same time, what is specified in custom_fragment is not included in the host file itself.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question