--- /dev/null
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+
+ root /var/www/html;
+
+ index index.html index.htm index.nginx-debian.html;
+
+ server_name _;
+
+ location / {
+ # First attempt to serve request as file, then
+ # as directory, then fall back to displaying a 404.
+ try_files $uri $uri/ =404;
+ }
+
+ location /papers {
+ root /var/www;
+ autoindex on;
+ }
+
+ location /source {
+ root /usr/share/gitweb/;
+ include fastcgi_params;
+ gzip off;
+ fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
+ fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
+ fastcgi_pass unix:/var/run/fcgiwrap.socket;
+ }
+
+ location /static { # gitweb static files
+ root /usr/share/gitweb;
+ try_files $uri $uri/ =404;
+ }
+
+}