Skip to content
Permalink
Browse files

Do a better job of handling sitename.com and www.sitename.com

  • Loading branch information...
perlDreamer committed Jan 8, 2012
1 parent 8ba3bbe commit 44e3705f923be0aa9ffd86f3aba0f9d5528addf7
Showing with 14 additions and 10 deletions.
  1. +14 −10 wre/var/setupfiles/nginx.template
@@ -1,5 +1,11 @@
##Force all domain requests, mysite.com, to go to www.mysite.com
server {
server_name [% sitename %] [%domain %];
server_name [% domain %];
rewrite ^ $scheme://[% sitename %]$request_uri redirect;
}

server {
server_name [% sitename %];

listen [% config.get('nginx/port') %]; ## listen for ipv4

@@ -58,17 +64,15 @@ server {
# proxy_set_header Host $host;
# proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
# }
# location /uploads {
# expires 2h;
# if ( $request_filename ~ "^(.*/)" ) {
# set $request_directory $document_root$1;
# }
# if ( -f "$request_directory/.wgaccess" ) {
# proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
# }
#
# location /extras/ {
# add_header Cache-Control public;
# expires 24h;
# root /data/WebGUI/www/extras;
# add_header Access-Control-Allow-Origin *;
# }
#
# location /uploads/filepump { expires max; }
# location /extras/ { expires 24h; }
# location = /default.ida { access_log off; deny all; }
# location /_vti_bin { access_log off; deny all; }
# location /_mem_bin { access_log off; deny all; }

0 comments on commit 44e3705

Please sign in to comment.
You can’t perform that action at this time.