13:b196af59f22e
Anton Shestakov <engored@ya.ru>, Fri, 22 Apr 2016 07:15:57 +0000
(none)

next change 17:5a3522b5fd5c
previous change 12:50c13f88d745

roles/hgweb/templates/etc/nginx/sites-available/hgweb

Permissions: -rw-r--r--

Other formats: Feeds:
upstream hgweb {
server unix:/home/{{ user }}/hgwebfiles/socket fail_timeout=0;
}
server {
server_name {{ subdomain }}.{{ hostname }};
listen 80;
listen [::]:80;
access_log /var/log/nginx/{{ subdomain }}.{{ hostname }}.access.log;
error_log /var/log/nginx/{{ subdomain }}.{{ hostname }}.error.log;
root /home/{{ user }}/hg/mercurial/templates/;
location / {
proxy_pass http://hgweb;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static {
gzip on;
gzip_types text/plain text/css application/javascript application/x-javascript text/javascript;
gzip_vary on;
expires 30d;
}
}