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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
slapos
Commits
608b462a
Commit
608b462a
authored
Oct 26, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apache-frontend: Make url if https-url is not defined.
parent
06aaee0f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
software/apache-frontend/common.cfg
software/apache-frontend/common.cfg
+1
-1
software/apache-frontend/templates/default-virtualhost.conf.in
...are/apache-frontend/templates/default-virtualhost.conf.in
+3
-3
No files found.
software/apache-frontend/common.cfg
View file @
608b462a
...
@@ -152,7 +152,7 @@ mode = 640
...
@@ -152,7 +152,7 @@ mode = 640
[template-default-slave-virtualhost]
[template-default-slave-virtualhost]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/default-virtualhost.conf.in
url = ${:_profile_base_location_}/templates/default-virtualhost.conf.in
md5sum =
c50959e7c38b307f1a1c274505a7e1c1
md5sum =
8975fd41fae2dcac92e18df3c6375f9a
mode = 640
mode = 640
[template-cached-slave-virtualhost]
[template-cached-slave-virtualhost]
...
...
software/apache-frontend/templates/default-virtualhost.conf.in
View file @
608b462a
...
@@ -78,14 +78,14 @@
...
@@ -78,14 +78,14 @@
# 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',
''
) }}/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}:443/{{ slave_parameter.get('path', '') }}/VirtualHostRoot/$1 [L,P]
{% elif slave_parameter.get('type', '') == 'redirect' -%}
{% elif slave_parameter.get('type', '') == 'redirect' -%}
RewriteRule (.*) {{ slave_parameter.get('https-url',
''
)}}$1 [R,L]
RewriteRule (.*) {{ slave_parameter.get('https-url',
slave_parameter.get('url', '')
)}}$1 [R,L]
{% 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]
{% endif -%}
{% endif -%}
RewriteRule ^/(.*)$ {{ slave_parameter.get('https-url',
''
) }}/$1 [L,P]
RewriteRule ^/(.*)$ {{ slave_parameter.get('https-url',
slave_parameter.get('url', '')
) }}/$1 [L,P]
{% endif -%}
{% endif -%}
</VirtualHost>
</VirtualHost>
...
...
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