Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Projects
Groups
Snippets
Sign up now
Login
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
a3653a1f
Commit
a3653a1f
authored
Nov 15, 2014
by
Grazyna Jaworska
Browse files
Nginx: Avoid redirect loops.
parent
0ef786c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
http/Provision/Config/Nginx/vhost.tpl.php
View file @
a3653a1f
...
...
@@ -62,10 +62,13 @@ if ($this->redirection || $ssl_redirection) {
// redirect all aliases + main uri to the main https uri.
print
"
\n
rewrite ^ https://
{
$this
->
uri
}
\$
request_uri? permanent;
\n
"
;
}
elseif
(
!
$ssl_redirection
&&
$this
->
redirection
)
{
elseif
(
!
$ssl_redirection
&&
$this
->
redirection
&&
$this
->
redirection
!=
$this
->
uri
)
{
// Redirect all aliases to the main http url.
print
"
\n
rewrite ^ http://
{
$this
->
redirection
}
\$
request_uri? permanent;
\n
"
;
}
else
{
print
" include "
.
$server
->
include_path
.
"/nginx_vhost_common.conf;
\n
"
;
}
}
else
{
print
" include "
.
$server
->
include_path
.
"/nginx_vhost_common.conf;
\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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