Skip to content

Commit 44e3705

Browse files
committedJan 8, 2012
Do a better job of handling sitename.com and www.sitename.com
1 parent 8ba3bbe commit 44e3705

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
 

‎wre/var/setupfiles/nginx.template

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
##Force all domain requests, mysite.com, to go to www.mysite.com
12
server {
2-
server_name [% sitename %] [%domain %];
3+
server_name [% domain %];
4+
rewrite ^ $scheme://[% sitename %]$request_uri redirect;
5+
}
6+
7+
server {
8+
server_name [% sitename %];
39

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

@@ -58,17 +64,15 @@ server {
5864
# proxy_set_header Host $host;
5965
# proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
6066
# }
61-
# location /uploads {
62-
# expires 2h;
63-
# if ( $request_filename ~ "^(.*/)" ) {
64-
# set $request_directory $document_root$1;
65-
# }
66-
# if ( -f "$request_directory/.wgaccess" ) {
67-
# proxy_pass http://127.0.0.1:[% config.get('starman/port') %];
68-
# }
67+
#
68+
# location /extras/ {
69+
# add_header Cache-Control public;
70+
# expires 24h;
71+
# root /data/WebGUI/www/extras;
72+
# add_header Access-Control-Allow-Origin *;
6973
# }
74+
#
7075
# location /uploads/filepump { expires max; }
71-
# location /extras/ { expires 24h; }
7276
# location = /default.ida { access_log off; deny all; }
7377
# location /_vti_bin { access_log off; deny all; }
7478
# location /_mem_bin { access_log off; deny all; }

0 commit comments

Comments
 (0)
Please sign in to comment.