diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-08-06 17:19:45 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-08-18 13:36:09 +0100 |
commit | 2f0698a78b300e3835fbc0a80621e89095d99abb (patch) | |
tree | fd3d656132960de47b0dc200a32c598968d73977 | |
parent | 457644b5a0474dc21e2f547064437b64dc3fd779 (diff) |
Make nginx redirect server an example
This is unusable with the install script as you can’t pass additional
domains to it. Also makes the assumption that you’re using www. as the
canonical domain name, which might not be the case if you were running alaveteli as as e.g. foi.example.org.
-rw-r--r-- | config/nginx.conf.example | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/nginx.conf.example b/config/nginx.conf.example index af052bffa..a09f27643 100644 --- a/config/nginx.conf.example +++ b/config/nginx.conf.example @@ -2,10 +2,13 @@ upstream alaveteli { server 127.0.0.1:3000; } -server { - server_name example.com example.org www.example.org; - rewrite ^(.*) http://www.example.com$1 permanent; -} +# Example to redirect other domains to the canonical URL. Also redirects the +# unqualified domain to the FQDN www.example.com, which is recommended. +# +# server { +# server_name example.com example.org www.example.org; +# rewrite ^(.*) http://www.example.com$1 permanent; +# } server { listen 80 default; |