3 server_name www.example.com;
4 access_log /var/log/nginx/example.access.log main;
5 error_log /var/log/nginx/example.error.log warn;
11 # redirect if not using www
13 server_name example.com;
14 rewrite ^(.+)$ http://www.$host$1 permanent;
17 # just resize and serve images and static files
19 server_name images.example.com;
20 access_log /var/log/nginx/images.access.log main;
21 error_log /var/log/nginx/images.error.log warn;
29 server_name .staging.example.com;
30 access_log /var/log/nginx/staging.access.log main;
31 error_log /var/log/nginx/staging.error.log warn;
39 server_name .dev.example.com;
40 access_log /var/log/nginx/dev.access.log main;
41 error_log /var/log/nginx/dev.error.log warn;