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
cf7053c1
Commit
cf7053c1
authored
Jul 07, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set nginx server_names_hash_bucket_size to 64, fixes #93
parent
430b2dec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
web.sh
setup/web.sh
+5
-0
editconf.py
tools/editconf.py
+9
-4
No files found.
setup/web.sh
View file @
cf7053c1
...
...
@@ -13,6 +13,11 @@ rm -f /etc/nginx/sites-enabled/default
# SSL settings from @konklone
cp
conf/nginx-ssl.conf /etc/nginx/nginx-ssl.conf
# Fix some nginx defaults.
# The server_names_hash_bucket_size seems to prevent long domain names?
tools/editconf.py /etc/nginx/nginx.conf
-s
\
server_names_hash_bucket_size
=
"64;"
# Other nginx settings will be configured by the management service
# since it depends on what domains we're serving, which we don't know
# until mail accounts have been created.
...
...
tools/editconf.py
View file @
cf7053c1
...
...
@@ -68,24 +68,29 @@ while len(input_lines) > 0:
for
i
in
range
(
len
(
settings
)):
# Check that this line contain this setting from the command-line arguments.
name
,
val
=
settings
[
i
]
.
split
(
"="
,
1
)
m
=
re
.
match
(
"
\
s*
"
+
re
.
escape
(
name
)
+
delimiter_re
+
"(.*?)
\
s*$"
,
line
,
re
.
S
)
m
=
re
.
match
(
"
(
\
s*)(#
\
s*)?
"
+
re
.
escape
(
name
)
+
delimiter_re
+
"(.*?)
\
s*$"
,
line
,
re
.
S
)
if
not
m
:
continue
indent
,
is_comment
,
existing_val
=
m
.
groups
()
# If this is already the setting, do nothing.
if
m
.
group
(
1
)
==
val
:
if
is_comment
is
None
and
existing_val
==
val
:
buf
+=
line
found
.
add
(
i
)
break
# comment-out the existing line (also comment any folded lines)
buf
+=
"#"
+
line
.
rstrip
()
.
replace
(
"
\n
"
,
"
\n
#"
)
+
"
\n
"
if
is_comment
is
None
:
buf
+=
"#"
+
line
.
rstrip
()
.
replace
(
"
\n
"
,
"
\n
#"
)
+
"
\n
"
else
:
# the line is already commented, pass it through
buf
+=
line
# if this option oddly appears more than once, don't add the setting again
if
i
in
found
:
break
# add the new setting
buf
+=
name
+
delimiter
+
val
+
"
\n
"
buf
+=
indent
+
name
+
delimiter
+
val
+
"
\n
"
# note that we've applied this option
found
.
add
(
i
)
...
...
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