I am using SALT provisioning to create my vagrant box.
In my apache2.sls I have
apache2:
pkg:
- installed
service:
- running
How can I make sure mod_rewrite is enabled?
Thank you so much for your valuable time.
I am using SALT provisioning to create my vagrant box.
In my apache2.sls I have
apache2:
pkg:
- installed
service:
- running
How can I make sure mod_rewrite is enabled?
Thank you so much for your valuable time.
If you mean to just enable mod_rewrite, try something like this:
sudo a2enmod rewrite:
cmd.run:
- unless: test -f /etc/apache2/mods-enabled/rewrite.load
- require:
- pkg: apache2
apache2:
pkg.installed:
- name: apache2
service.running:
- name: apache2
- require:
- pkg: apache2
- watch:
- cmd: sudo a2enmod rewrite
This should install the package, then run the script (since the service requires both the cmd and the pkg), and then it will watch to restart the service once the script has been run. If it doesn't work for you, feel free to join us in the #salt irc and we'll get it figured out!