+map $sent_http_content_type $expires {
+ default off;
+ text/html epoch;
+}
+
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
+ expires $expires;
+
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
location /static { # gitweb static files
root /usr/share/gitweb;
- try_files $uri $uri/ =404;
+ try_files $uri $uri/ =404;
}
}