Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
0cdc1614
Commit
0cdc1614
authored
Feb 23, 2018
by
Roque
Committed by
Julien Muchembled
Feb 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5: new parameters to set custom http and https virtualhost ports for frontend
parent
59f90275
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
3 deletions
+29
-3
software/apache-frontend/instance-slave-apache-input-schema.json
...e/apache-frontend/instance-slave-apache-input-schema.json
+10
-0
software/apache-frontend/templates/default-virtualhost.conf.in
...are/apache-frontend/templates/default-virtualhost.conf.in
+2
-2
software/erp5/instance-erp5-input-schema.json
software/erp5/instance-erp5-input-schema.json
+11
-1
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+6
-0
No files found.
software/apache-frontend/instance-slave-apache-input-schema.json
View file @
0cdc1614
...
@@ -175,6 +175,16 @@
...
@@ -175,6 +175,16 @@
"default"
:
""
,
"default"
:
""
,
"textarea"
:
true
,
"textarea"
:
true
,
"type"
:
"string"
"type"
:
"string"
},
"virtualhostroot-http-port"
:
{
"description"
:
"Port where http requests to frontend will be redirected."
,
"default"
:
80
,
"type"
:
"integer"
},
"virtualhostroot-https-port"
:
{
"description"
:
"Port where https requests to frontend will be redirected."
,
"default"
:
443
,
"type"
:
"integer"
}
}
}
}
}
}
software/apache-frontend/templates/default-virtualhost.conf.in
View file @
0cdc1614
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
# First, we check if we have a zope backend server
# First, we check if we have a zope backend server
# If so, let's use Virtual Host Monster rewrite
# If so, let's use Virtual Host Monster rewrite
# We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
# We suppose that Apache listens to 443 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ {{ slave_parameter.get('https-url', slave_parameter.get('url', '')) }}/VirtualHostBase/https//%{SERVER_NAME}:
443
/{{ slave_parameter.get('path', '') }}/VirtualHostRoot/$1 [L,P]
RewriteRule ^/(.*)$ {{ slave_parameter.get('https-url', slave_parameter.get('url', '')) }}/VirtualHostBase/https//%{SERVER_NAME}:
{{ slave_parameter.get('virtualhostroot-https-port', '443') }}
/{{ slave_parameter.get('path', '') }}/VirtualHostRoot/$1 [L,P]
{% elif slave_type == 'redirect' -%}
{% elif slave_type == 'redirect' -%}
RewriteRule (.*) {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}$1 [R,L]
RewriteRule (.*) {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}$1 [R,L]
{% else -%}
{% else -%}
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
# First, we check if we have a zope backend server
# First, we check if we have a zope backend server
# If so, let's use Virtual Host Daemon rewrite
# If so, let's use Virtual Host Daemon rewrite
# We suppose that Apache listens to 80 (even indirectly thanks to things like iptables)
# We suppose that Apache listens to 80 (even indirectly thanks to things like iptables)
RewriteRule ^/(.*)$ {{ slave_parameter.get('url', '') }}/VirtualHostBase/http/%{SERVER_NAME}:
80
/{{ slave_parameter.get('path', '') }}/VirtualHostRoot/$1 [L,P]
RewriteRule ^/(.*)$ {{ slave_parameter.get('url', '') }}/VirtualHostBase/http/%{SERVER_NAME}:
{{ slave_parameter.get('virtualhostroot-http-port', '80') }}
/{{ slave_parameter.get('path', '') }}/VirtualHostRoot/$1 [L,P]
{% else -%}
{% else -%}
{% if 'default-path' in slave_parameter %}
{% if 'default-path' in slave_parameter %}
RewriteRule ^/?$ {{ slave_parameter.get('default-path') }} [R=301,L]
RewriteRule ^/?$ {{ slave_parameter.get('default-path') }} [R=301,L]
...
...
software/erp5/instance-erp5-input-schema.json
View file @
0cdc1614
...
@@ -88,7 +88,17 @@
...
@@ -88,7 +88,17 @@
"description"
:
"Request a front-end slave instance of this software type."
,
"description"
:
"Request a front-end slave instance of this software type."
,
"default"
:
"RootSoftwareInstance"
,
"default"
:
"RootSoftwareInstance"
,
"type"
:
"object"
"type"
:
"object"
}
},
"virtualhostroot-http-port"
:
{
"description"
:
"Front-end slave http port. Port where http requests to frontend will be redirected."
,
"default"
:
80
,
"type"
:
"integer"
},
"virtualhostroot-https-port"
:
{
"description"
:
"Front-end slave https port. Port where https requests to frontend will be redirected."
,
"default"
:
443
,
"type"
:
"integer"
}
},
},
"type"
:
"object"
"type"
:
"object"
},
},
...
...
stack/erp5/instance-erp5.cfg.in
View file @
0cdc1614
...
@@ -301,6 +301,12 @@ slave = true
...
@@ -301,6 +301,12 @@ slave = true
{% if frontend_dict.get('domain') -%}
{% if frontend_dict.get('domain') -%}
{% do config_dict.__setitem__('custom_domain', frontend_dict['domain']) -%}
{% do config_dict.__setitem__('custom_domain', frontend_dict['domain']) -%}
{% endif -%}
{% endif -%}
{% if frontend_dict.get('virtualhostroot-http-port') -%}
{% do config_dict.__setitem__('virtualhostroot-http-port', frontend_dict['virtualhostroot-http-port']) -%}
{% endif -%}
{% if frontend_dict.get('virtualhostroot-https-port') -%}
{% do config_dict.__setitem__('virtualhostroot-https-port', frontend_dict['virtualhostroot-https-port']) -%}
{% endif -%}
{% for name, value in config_dict.items() -%}
{% for name, value in config_dict.items() -%}
config-{{ name }} = {{ value }}
config-{{ name }} = {{ value }}
{% endfor -%}
{% endfor -%}
...
...
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