Skip to content

Commit

Permalink
Merge pull request #224 from RotherOSS/issue-RotherOSS/otobo-docker#1…
Browse files Browse the repository at this point in the history
…-nginx_redirect

Issue RotherOSS/otobo-docker#1: redirect to the calling URL
  • Loading branch information
bschmalhofer authored Jul 21, 2020
2 parents 5500bd5 + d134bf6 commit 7c56321
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/nginx/templates/otobo_nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
# This config is based on default.conf in the nginx installation


# don't server HTTP
# Do not serve HTTP, redirect to HTTPS instead.
# See https://linuxize.com/post/redirect-http-to-https-in-nginx/.
server {
listen 80;
listen [::]:80;

server_name localhost;
# catch all domains
server_name _;

# 301 Moved Permanently, (in 'SEO-speak', it is said that the 'link-juice' is sent to the new URL).
return 301 https://$server_name$request_uri;
return 301 https://$host$request_uri;
}

# serve HTTPS
Expand Down

0 comments on commit 7c56321

Please sign in to comment.