working apache2 config
Had to enable mcrypt via php2enmod, rewrite mod via a2enmod, which
while using the command task is less than ideal, at least uses
platform-preferred methods. Also fixed spacing in the logdir
creation task, and set DocumentRoot in the default sites-enabled,
instead of the main apache2 config.
command: php5enmod mcrypt
become: yes
+- name: enable apache rewrite
+ command: a2enmod rewrite
+ become: yes
+
- name: create apache2 logdir
file:
path: /etc/apache2/logs
group: www-data
mode: 0775
+- name: set DocumentRoot in default site-enabled
+ lineinfile:
+ dest: /etc/apache2/sites-enabled/000-default.conf
+ line: ' DocumentRoot "/var/www/html/php-gateway/public"'
+ regexp: '^\s+DocumentRoot'
+ state: present
