Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
6ffd9fe9
Commit
6ffd9fe9
authored
May 18, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement simple frontend configuration.
parent
0bd0aac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
3 deletions
+48
-3
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
+48
-3
No files found.
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
View file @
6ffd9fe9
...
...
@@ -724,9 +724,54 @@ class Recipe(BaseSlapRecipe):
'template/apache.zope.conf.in'
)
%
apache_conf
return
self
.
createConfigurationFile
(
prefix
+
'.conf'
,
apache_conf_string
)
def
installFrontendZopeApache
(
self
,
name
,
path
,
backend_url
,
backend_path
,
port
,
key
,
certificate
,
access_control_string
=
None
):
pass
def
installFrontendZopeApache
(
self
,
ip
,
port
,
name
,
frontend_path
,
backend_url
,
backend_path
,
key
,
certificate
,
access_control_string
=
None
):
ident
=
'frontend_'
+
name
apache_conf
=
self
.
_getApacheConfigurationDict
(
ident
,
ip
,
port
)
apache_conf
[
'server_name'
]
=
name
apache_conf
[
'ssl_snippet'
]
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.ssl-snippet.conf.in'
)
%
dict
(
login_certificate
=
certificate
,
login_key
=
key
)
rewrite_rule_template
=
\
"RewriteRule ^%(path)s($|/.*) %(backend_url)s/VirtualHostBase/https/%(server_name)s:%(port)s%(backend_path)s/VirtualHostRoot/_vh_%(vhname)s$1 [L,P]
\
n
"
path
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.zope.conf.path-protected.in'
)
%
dict
(
path
=
'/'
,
access_control_string
=
'none'
)
if
access_control_string
is
None
:
path_template
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.zope.conf.path.in'
)
path
+=
path_template
%
dict
(
path
=
frontend_path
)
else
:
path_template
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.zope.conf.path-protected.in'
)
path
+=
path_template
%
dict
(
path
=
frontend_path
,
access_control_string
=
access_control_string
)
d
=
dict
(
path
=
frontend_path
,
backend_url
=
backend_url
,
backend_path
=
backend_path
,
port
=
apache_conf
[
'port'
],
vhname
=
frontend_path
.
replace
(
'/'
,
''
),
server_name
=
name
)
rewrite_rule
=
rewrite_rule_template
%
d
apache_conf
.
update
(
**
dict
(
path_enable
=
path
,
rewrite_rule
=
rewrite_rule
))
apache_conf_string
=
pkg_resources
.
resource_string
(
__name__
,
'template/apache.zope.conf.in'
)
%
apache_conf
apache_config_file
=
self
.
createConfigurationFile
(
ident
+
'.conf'
,
apache_conf_string
)
self
.
path_list
.
append
(
apache_config_file
)
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
ident
,
__name__
+
'.apache'
,
'runApache'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
dict
(
required_path_list
=
[
key
,
certificate
],
binary
=
self
.
options
[
'httpd_binary'
],
config
=
apache_config_file
)
]))
def
installBackendApache
(
self
,
ip
,
port
,
backend
,
key
,
certificate
,
suffix
=
''
,
access_control_string
=
None
):
...
...
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