Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Change apache2 running user/group to vagrant:vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
flohessling committed Aug 23, 2019
1 parent 7e78afd commit d1fd872
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
34 changes: 34 additions & 0 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,37 @@
apt:
pkg: apache2
state: latest

- name: change apache run user
become: yes
lineinfile:
dest: "/etc/apache2/envvars"
regexp: "^export APACHE_RUN_USER="
line: "export APACHE_RUN_USER=vagrant"
state: present

- name: change apache run group
become: yes
lineinfile:
dest: "/etc/apache2/envvars"
regexp: "^export APACHE_RUN_GROUP="
line: "export APACHE_RUN_GROUP=vagrant"
state: present

- name: change permissions on /var/lock/apache2
become: yes
file:
path: /var/lock/apache2
state: directory
recurse: yes
owner: vagrant
group: vagrant

- name: change permissions on /var/log/apache2
become: yes
file:
path: /var/log/apache2
state: directory
recurse: yes
owner: vagrant
group: vagrant
7 changes: 0 additions & 7 deletions ansible/roles/shopware-dev/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@
regexp: '^#TRUSTED_PROXIES'
line: 'TRUSTED_PROXIES=127.0.0.1,127.0.0.2,::1'

- name: change group to www-data for shopware-dev directory
become: yes
file:
path: /home/vagrant/shopware-dev
group: www-data
recurse: yes

- name: enable mod_rewrite
become: yes
apache2_module:
Expand Down

1 comment on commit d1fd872

@flohessling
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes Issue #9

Please sign in to comment.