will give you lots of examples. Here are things that were useful to
me, in the order they appear in the `http` block of my `nginx.conf`.
+Redirecting `www.example.com` to `example.com`
+==============================================
+
+This keeps people who accidentally add a `www.` prefix to your URL
+from matching the wildcard virtual host block defined below.
+
+ server {
+ # www.example.com -> example.com
+ listen 80;
+ listen 443 ssl;
+ server_name www.example.com;
+ ssl_certificate /etc/ssl/nginx/www.example.com.pem;
+ ssl_certificate_key /etc/ssl/nginx/www.example.com-key.pem;
+ rewrite ^/(.*)$ $scheme://example.com/$1 permanent;
+ }
+
Gitweb (and general CGI approach)
=================================