server{
        server_name prometheus.watcher.igarson.app;
        access_log /var/log/nginx/ig/access.prometheus.watcher.igarson.app.log;
        
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://127.0.0.1:9090;
            proxy_read_timeout 90;
            proxy_redirect off;
            proxy_http_version 1.1;
        }
    listen 80;


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/prometheus.watcher.igarson.app/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/prometheus.watcher.igarson.app/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server{
        server_name alertmanager.watcher.igarson.app;
        access_log /var/log/nginx/ig/access.alertmanager.watcher.igarson.app.log;
        
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://127.0.0.1:9093;
            proxy_read_timeout 90;
            proxy_redirect off;
            proxy_http_version 1.1;
        }
    listen 80;


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/alertmanager.watcher.igarson.app/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/alertmanager.watcher.igarson.app/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server{
        server_name unsee.watcher.igarson.app;
        access_log /var/log/nginx/ig/access.unsee.watcher.igarson.app.log;
        
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://127.0.0.1:9094;
            proxy_read_timeout 90;
            proxy_redirect off;
            proxy_http_version 1.1;
        }
    listen 80;


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/unsee.watcher.igarson.app/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/unsee.watcher.igarson.app/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server{
        server_name grafana.watcher.igarson.app;
        access_log /var/log/nginx/ig/access.grafana.watcher.igarson.app.log;
        
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://127.0.0.1:3000;
            proxy_read_timeout 90;
            proxy_redirect off;
            proxy_http_version 1.1;
        }
    listen 80;


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/grafana.watcher.igarson.app/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/grafana.watcher.igarson.app/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
