server {
        listen 80;
        listen [::]:80;

        root /var/www/r7-office/contacts;
        index index.html;

        server_name contacts.{domain};

	#location /source {
	#    proxy_pass http://cddisk.{domain}/source;
	#}

  location /api {
    proxy_set_header host $host;
    proxy_set_header X-real-ip $remote_addr;
    proxy_set_header X-forward-for $proxy_add_x_forwarded_for;
    proxy_set_header X-Module Contacts;
    proxy_pass http://0.0.0.0:38033/api;
  }

  location / {
    try_files $uri $uri/ /index.html;
  }
}
