server { listen 80; listen [::]:80; ## listen for ipv4; this line is default and implied # listen [::]:80 default_server ipv6only=on; ## listen for ipv6 root /home/docbuilder/stage.taler.net; # Make site accessible from http://localhost/ server_name stage.taler.net; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; listen [::]:443 ssl; ## listen for ipv4; this line is default and implied #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 # Make site accessible from http://localhost/ server_name stage.taler.net; include conf.d/talerssl; location / { root /home/docbuilder/stage.taler.net; autoindex off; rewrite ^/$ /$index_redirect_uri/ redirect; rewrite ^/(..)/$ /$1/index.html break; rewrite ^/(help/empty-wallet)$ /$1.html break; rewrite ^/wallet-installation\.html$ /en/wallet.html redirect; # just to get around cached old redirect rewrite ^/wallet\.en\.html$ /en/wallet.html redirect; rewrite ^/wallet$ /en/wallet.html redirect; rewrite ^/press$ /en/press.html redirect; } gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; location ~* \.(png|jpg|jpeg|gif|ico|svg|js|css)$ { root /home/docbuilder/stage.taler.net; expires 1y; } # Note: this will go to /var/www/(videos|releases), which we took out of Git location /videos { root /var/www; expires max; } # FIXME: this location newest files are from Oct'16 location /releases { root /var/www; autoindex on; } location /files { root /var/www; } }