Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
apache-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
apache-formula
Commits
03de9808
Unverified
Commit
03de9808
authored
6 years ago
by
Niels Abspoel
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #230 from ze42/docroot_owner
vhosts/standard: allow to set docroot ownership
parents
00b437aa
37f8af4b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
apache/vhosts/standard.sls
+2
-1
2 additions, 1 deletion
apache/vhosts/standard.sls
pillar.example
+7
-0
7 additions, 0 deletions
pillar.example
with
9 additions
and
1 deletion
apache/vhosts/standard.sls
+
2
−
1
View file @
03de9808
...
@@ -24,9 +24,10 @@ include:
...
@@ -24,9 +24,10 @@ include:
{% if site.get('DocumentRoot') != False %}
{% if site.get('DocumentRoot') != False %}
{{ id }}-documentroot:
{{ id }}-documentroot:
file.directory:
file.directory:
- unless: test -d {{ documentroot }}
- name: {{ documentroot }}
- name: {{ documentroot }}
- makedirs: True
- makedirs: True
- user: {{ site.get('DocumentRootUser', apache.get('document_root_user'))|json }}
- group: {{ site.get('DocumentRootGroup', apache.get('document_root_group'))|json }}
- allow_symlink: True
- allow_symlink: True
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
pillar.example
+
7
−
0
View file @
03de9808
...
@@ -26,6 +26,11 @@ apache:
...
@@ -26,6 +26,11 @@ apache:
# Default value for AddDefaultCharset in RedHat configuration
# Default value for AddDefaultCharset in RedHat configuration
default_charset: 'UTF-8'
default_charset: 'UTF-8'
# Should we enforce DocumentRoot user/group?
# Default: do not enforce
document_root_user: www-data # Force user if specified, leave it default if not
document_root_group: null # Do not enforce group
global:
global:
# global apache directives
# global apache directives
AllowEncodedSlashes: 'On'
AllowEncodedSlashes: 'On'
...
@@ -71,6 +76,8 @@ apache:
...
@@ -71,6 +76,8 @@ apache:
CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
DocumentRootUser: null # do not enforce user, defaults to lookup:document_root_user
DocumentRootGroup: www-data # Force group, defaults to lookup:document_root_group
SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
...
...
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