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
Carlos Ramos Carreño
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
url = ${:_profile_base_location_}/monitor.cfg.in
output = ${buildout:directory}/monitor.cfg
filename = monitor.cfg
md5sum =
7387e01d054954aa8fe98c9e6a6156a9
md5sum =
852a0e205e005969547cce8192e531cd
mode = 0644
[monitor-bin]
...
...
@@ -57,7 +57,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum =
2668fae366c1df56757c09fad476f627
md5sum =
335e618be6bbe02328cd3aaa30e29d9c
filename = cgi-httpd.conf.in
mode = 0644
...
...
stack/monitor/cgi-httpd.conf.in
View file @
d2b123c4
PidFile "
${:pid-file
}"
PidFile "
{{ httpd_configuration.get('pid-file') }
}"
ServerName example.com
ServerAdmin someone@email
<IfDefine !MonitorPort>
Listen [
${:listening-ip}]:${monitor-parameters:port
}
Listen [
{{ httpd_configuration.get('listening-ip') }}]:{{ monitor_parameters.get('port') }
}
Define MonitorPort
</IfDefine>
DocumentRoot "
${monitor-directory:www
}"
ErrorLog "
${:error-log
}"
DocumentRoot "
{{ directory.get('www') }
}"
ErrorLog "
{{ httpd_configuration.get('error-log') }
}"
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
...
...
@@ -25,8 +25,8 @@ LoadModule authn_file_module modules/mod_authn_file.so
# SSL Configuration
<IfDefine !SSLConfigured>
Define SSLConfigured
SSLCertificateFile
${ca-httpd:cert-file
}
SSLCertificateKeyFile
${ca-httpd:key-file
}
SSLCertificateFile
{{ httpd_configuration.get('certificate') }
}
SSLCertificateKeyFile
{{ httpd_configuration.get('key') }
}
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLRandomSeed startup /dev/urandom 256
...
...
@@ -36,18 +36,18 @@ SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH
</IfDefine>
SSLEngine On
ScriptSock
${:cgid-pid-file
}
<Directory
${monitor-directory:www
}>
ScriptSock
{{ httpd_configuration.get('cgid-pid-file') }
}
<Directory
{{ directory.get('www') }
}>
SSLVerifyDepth 1
SSLRequireSSL
SSLOptions +StrictRequire
# XXX: security????
Options +ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex
${monitor-parameters:index-filename
}
DirectoryIndex
{{ monitor_parameters.get('index-filename') }
}
</Directory>
Alias /private/
${monitor-directory:private-directory
}/
<Directory
${monitor-directory:private-directory
}>
Alias /private/
{{ directory.get('private-directory') }
}/
<Directory
{{ directory.get('private-directory') }
}>
Order Deny,Allow
Deny from env=AUTHREQUIRED
<Files ".??*">
...
...
@@ -56,7 +56,7 @@ Deny from env=AUTHREQUIRED
</Files>
AuthType Basic
AuthName "Private access"
AuthUserFile "
${monitor-parameters:htaccess-file
}"
AuthUserFile "
{{ monitor_parameters.get('htaccess-file') }
}"
Require valid-user
Options Indexes FollowSymLinks
Satisfy all
...
...
stack/monitor/monitor.cfg.in
View file @
d2b123c4
...
...
@@ -235,24 +235,33 @@ recipe = slapos.cookbook:zero-knowledge.read
filename = $${public:filename}
# XXX could it be something lighter?
[cgi-httpd-configuration-file]
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}
[monitor-httpd-configuration]
pid-file = $${monitor-directory:run}/cgi-httpd.pid
cgid-pid-file = $${monitor-directory:run}/cgi-httpd-cgid.pid
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]
recipe = slapos.cookbook:wrapper
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}
[cgi-httpd-graceful-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
[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