Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
typo3_site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chef Cookbooks
typo3_site
Commits
4088fbd4
Commit
4088fbd4
authored
4 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Completely switch to vagrant as user/group for Apache and PHP
parent
f2b23c87
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recipes/default.rb
+7
-1
7 additions, 1 deletion
recipes/default.rb
templates/default/www.conf.erb
+2
-2
2 additions, 2 deletions
templates/default/www.conf.erb
with
9 additions
and
3 deletions
recipes/default.rb
+
7
−
1
View file @
4088fbd4
...
@@ -312,13 +312,19 @@ execute "mkdir -p #{node['typo3_site']['webroot']}/#{base_hostname}/"
...
@@ -312,13 +312,19 @@ execute "mkdir -p #{node['typo3_site']['webroot']}/#{base_hostname}/"
execute
"chown vagrant:vagrant
#{
node
[
'typo3_site'
][
'webroot'
]
}
/
#{
base_hostname
}
/"
execute
"chown vagrant:vagrant
#{
node
[
'typo3_site'
][
'webroot'
]
}
/
#{
base_hostname
}
/"
execute
"a2ensite
#{
base_hostname
}
.conf"
execute
"a2ensite
#{
base_hostname
}
.conf"
#
The apache must be running as vagrant main group in order for a proper permission handling
#
Switch to vagrant as Apache main user
replace_or_add
'Change the apache group to the users main group'
do
replace_or_add
'Change the apache group to the users main group'
do
path
'/etc/apache2/envvars'
path
'/etc/apache2/envvars'
pattern
'export APACHE_RUN_GROUP=.*'
pattern
'export APACHE_RUN_GROUP=.*'
line
"export APACHE_RUN_GROUP=vagrant"
line
"export APACHE_RUN_GROUP=vagrant"
end
end
replace_or_add
'Change the apache group to the users main group'
do
path
'/etc/apache2/envvars'
pattern
'export APACHE_RUN_USER=.*'
line
"export APACHE_RUN_USER=vagrant"
end
service
'apache2'
do
service
'apache2'
do
action
:restart
action
:restart
end
end
...
...
This diff is collapsed.
Click to expand it.
templates/default/www.conf.erb
+
2
−
2
View file @
4088fbd4
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
; Unix user/group of processes
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
; will be used.
user =
www-data
user =
vagrant
group =
www-data
group =
vagrant
; The address on which to accept FastCGI requests.
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; Valid syntaxes are:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment