Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
cfe0fa91
Commit
cfe0fa91
authored
Dec 05, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a 'redirects' feature in web/custom.yaml
parent
31d6128a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
web_update.py
management/web_update.py
+2
-0
No files found.
management/web_update.py
View file @
cfe0fa91
...
@@ -115,6 +115,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env):
...
@@ -115,6 +115,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env):
yaml
=
yaml
[
domain
]
yaml
=
yaml
[
domain
]
for
path
,
url
in
yaml
.
get
(
"proxies"
,
{})
.
items
():
for
path
,
url
in
yaml
.
get
(
"proxies"
,
{})
.
items
():
nginx_conf
+=
"
\t
location
%
s {
\n\t\t
proxy_pass
%
s;
\n\t
}
\n
"
%
(
path
,
url
)
nginx_conf
+=
"
\t
location
%
s {
\n\t\t
proxy_pass
%
s;
\n\t
}
\n
"
%
(
path
,
url
)
for
path
,
url
in
yaml
.
get
(
"redirects"
,
{})
.
items
():
nginx_conf
+=
"
\t
rewrite
%
s
%
s permanent;
\n
"
%
(
path
,
url
)
# Add in any user customizations in the includes/ folder.
# Add in any user customizations in the includes/ folder.
nginx_conf_custom_include
=
os
.
path
.
join
(
env
[
"STORAGE_ROOT"
],
"www"
,
safe_domain_name
(
domain
)
+
".conf"
)
nginx_conf_custom_include
=
os
.
path
.
join
(
env
[
"STORAGE_ROOT"
],
"www"
,
safe_domain_name
(
domain
)
+
".conf"
)
...
...
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