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
01fb1027
Commit
01fb1027
authored
Nov 15, 2014
by
Grazyna Jaworska
Browse files
Revert "Issue
#2373923
by griz - https redirect problem with Nginx"
This reverts commit
3c5c0d4a
.
parent
3c5c0d4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
http/Provision/Config/Nginx/vhost.tpl.php
View file @
01fb1027
<?php
if
(
$
this
->
redirection
||
$
ssl_
redirection
)
{
if
(
$
ssl_
redirection
||
$
this
->
redirection
)
{
// Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx.
foreach
(
$this
->
aliases
as
$alias_url
)
{
print
"# alias redirection virtual host
\n
"
;
...
...
@@ -16,18 +16,7 @@ if ($this->redirection || $ssl_redirection) {
print
" server_name
{
$alias_url
}
;
\n
"
;
}
print
" access_log off;
\n
"
;
if
(
$ssl_redirection
&&
!
$this
->
redirection
)
{
// redirect aliases in non-ssl to the same alias on ssl.
print
" rewrite ^ https://
\$
host
\$
request_uri? permanent;
\n
"
;
}
elseif
(
$ssl_redirection
&&
$this
->
redirection
)
{
// redirect all aliases + main uri to the main https uri.
print
" rewrite ^ https://
{
$this
->
uri
}
\$
request_uri? permanent;
\n
"
;
}
elseif
(
!
$ssl_redirection
&&
$this
->
redirection
)
{
// Redirect all aliases to the main http url.
print
" rewrite ^ http://
{
$this
->
redirection
}
\$
request_uri? permanent;
\n
"
;
}
print
" rewrite ^
\$
scheme://
{
$this
->
redirection
}
\$
request_uri? permanent;
\n
"
;
print
"}
\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