Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
d2b123c4
Commit
d2b123c4
authored
Jul 28, 2014
by
Cédric Le Ninivin
Committed by
Nicolas Wavrant
Jul 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: move httpd configuration template to jinja2
parent
fe768142
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
21 deletions
+30
-21
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+2
-2
stack/monitor/cgi-httpd.conf.in
stack/monitor/cgi-httpd.conf.in
+12
-12
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+16
-7
No files found.
stack/monitor/buildout.cfg
View file @
d2b123c4
...
@@ -41,7 +41,7 @@ recipe = slapos.recipe.template
...
@@ -41,7 +41,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/monitor.cfg.in
url = ${:_profile_base_location_}/monitor.cfg.in
output = ${buildout:directory}/monitor.cfg
output = ${buildout:directory}/monitor.cfg
filename = monitor.cfg
filename = monitor.cfg
md5sum =
7387e01d054954aa8fe98c9e6a6156a9
md5sum =
852a0e205e005969547cce8192e531cd
mode = 0644
mode = 0644
[monitor-bin]
[monitor-bin]
...
@@ -57,7 +57,7 @@ mode = 0644
...
@@ -57,7 +57,7 @@ mode = 0644
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
download-only = true
download-only = true
md5sum =
2668fae366c1df56757c09fad476f627
md5sum =
335e618be6bbe02328cd3aaa30e29d9c
filename = cgi-httpd.conf.in
filename = cgi-httpd.conf.in
mode = 0644
mode = 0644
...
...
stack/monitor/cgi-httpd.conf.in
View file @
d2b123c4
PidFile "
${:pid-file
}"
PidFile "
{{ httpd_configuration.get('pid-file') }
}"
ServerName example.com
ServerName example.com
ServerAdmin someone@email
ServerAdmin someone@email
<IfDefine !MonitorPort>
<IfDefine !MonitorPort>
Listen [
${:listening-ip}]:${monitor-parameters:port
}
Listen [
{{ httpd_configuration.get('listening-ip') }}]:{{ monitor_parameters.get('port') }
}
Define MonitorPort
Define MonitorPort
</IfDefine>
</IfDefine>
DocumentRoot "
${monitor-directory:www
}"
DocumentRoot "
{{ directory.get('www') }
}"
ErrorLog "
${:error-log
}"
ErrorLog "
{{ httpd_configuration.get('error-log') }
}"
LoadModule unixd_module modules/mod_unixd.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_core_module modules/mod_authz_core.so
...
@@ -25,8 +25,8 @@ LoadModule authn_file_module modules/mod_authn_file.so
...
@@ -25,8 +25,8 @@ LoadModule authn_file_module modules/mod_authn_file.so
# SSL Configuration
# SSL Configuration
<IfDefine !SSLConfigured>
<IfDefine !SSLConfigured>
Define SSLConfigured
Define SSLConfigured
SSLCertificateFile
${ca-httpd:cert-file
}
SSLCertificateFile
{{ httpd_configuration.get('certificate') }
}
SSLCertificateKeyFile
${ca-httpd:key-file
}
SSLCertificateKeyFile
{{ httpd_configuration.get('key') }
}
SSLRandomSeed startup builtin
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLRandomSeed connect builtin
SSLRandomSeed startup /dev/urandom 256
SSLRandomSeed startup /dev/urandom 256
...
@@ -36,18 +36,18 @@ SSLHonorCipherOrder On
...
@@ -36,18 +36,18 @@ SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH
SSLCipherSuite RC4-SHA:HIGH:!ADH
</IfDefine>
</IfDefine>
SSLEngine On
SSLEngine On
ScriptSock
${:cgid-pid-file
}
ScriptSock
{{ httpd_configuration.get('cgid-pid-file') }
}
<Directory
${monitor-directory:www
}>
<Directory
{{ directory.get('www') }
}>
SSLVerifyDepth 1
SSLVerifyDepth 1
SSLRequireSSL
SSLRequireSSL
SSLOptions +StrictRequire
SSLOptions +StrictRequire
# XXX: security????
# XXX: security????
Options +ExecCGI
Options +ExecCGI
AddHandler cgi-script .cgi
AddHandler cgi-script .cgi
DirectoryIndex
${monitor-parameters:index-filename
}
DirectoryIndex
{{ monitor_parameters.get('index-filename') }
}
</Directory>
</Directory>
Alias /private/
${monitor-directory:private-directory
}/
Alias /private/
{{ directory.get('private-directory') }
}/
<Directory
${monitor-directory:private-directory
}>
<Directory
{{ directory.get('private-directory') }
}>
Order Deny,Allow
Order Deny,Allow
Deny from env=AUTHREQUIRED
Deny from env=AUTHREQUIRED
<Files ".??*">
<Files ".??*">
...
@@ -56,7 +56,7 @@ Deny from env=AUTHREQUIRED
...
@@ -56,7 +56,7 @@ Deny from env=AUTHREQUIRED
</Files>
</Files>
AuthType Basic
AuthType Basic
AuthName "Private access"
AuthName "Private access"
AuthUserFile "
${monitor-parameters:htaccess-file
}"
AuthUserFile "
{{ monitor_parameters.get('htaccess-file') }
}"
Require valid-user
Require valid-user
Options Indexes FollowSymLinks
Options Indexes FollowSymLinks
Satisfy all
Satisfy all
...
...
stack/monitor/monitor.cfg.in
View file @
d2b123c4
...
@@ -235,24 +235,33 @@ recipe = slapos.cookbook:zero-knowledge.read
...
@@ -235,24 +235,33 @@ recipe = slapos.cookbook:zero-knowledge.read
filename = $${public:filename}
filename = $${public:filename}
# XXX could it be something lighter?
# XXX could it be something lighter?
[cgi-httpd-configuration-file]
[monitor-httpd-configuration]
recipe = collective.recipe.template
input = ${monitor-httpd-template:destination}/${monitor-httpd-template:filename}
output = $${monitor-directory:etc}/cgi-httpd.conf
listening-ip = $${slap-parameters:ipv6-random}
pid-file = $${monitor-directory:run}/cgi-httpd.pid
pid-file = $${monitor-directory:run}/cgi-httpd.pid
cgid-pid-file = $${monitor-directory:run}/cgi-httpd-cgid.pid
cgid-pid-file = $${monitor-directory:run}/cgi-httpd-cgid.pid
error-log = $${monitor-directory:log}/cgi-httpd-error-log
error-log = $${monitor-directory:log}/cgi-httpd-error-log
listening-ip = $${slap-parameters:ipv6-random}
certificate = $${ca-httpd:cert-file}
key = $${ca-httpd:key-file}
[monitor-httpd-configuration-file]
recipe = slapos.recipe.template:jinja2
template = ${monitor-httpd-template:destination}/${monitor-httpd-template:filename}
rendered = $${monitor-directory:etc}/cgi-httpd.conf
mode = 0744
context =
section directory monitor-directory
section monitor_parameters monitor-parameters
section httpd_configuration monitor-httpd-configuration
[cgi-httpd-wrapper]
[cgi-httpd-wrapper]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
apache-executable = ${apache:location}/bin/httpd
apache-executable = ${apache:location}/bin/httpd
command-line = $${:apache-executable} -f $${
cgi-httpd-configuration-file:output
} -DFOREGROUND
command-line = $${:apache-executable} -f $${
monitor-httpd-configuration-file:rendered
} -DFOREGROUND
wrapper-path = $${ca-httpd:executable}
wrapper-path = $${ca-httpd:executable}
[cgi-httpd-graceful-wrapper]
[cgi-httpd-graceful-wrapper]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line = kill -USR1 $(cat $${
cgi-httpd-configuration-file
:pid-file})
command-line = kill -USR1 $(cat $${
monitor-httpd-configuration
:pid-file})
wrapper-path = $${monitor-directory:etc-run}/cgi-httpd-graceful
wrapper-path = $${monitor-directory:etc-run}/cgi-httpd-graceful
[monitor-promise]
[monitor-promise]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment