Skip to content

Instantly share code, notes, and snippets.

@jalogisch
Last active June 22, 2016 10:09
Show Gist options
  • Save jalogisch/782e897cc1dad1fdf29858c30a854a9b to your computer and use it in GitHub Desktop.
Save jalogisch/782e897cc1dad1fdf29858c30a854a9b to your computer and use it in GitHub Desktop.
server
{
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name graylog.example.org;
location /api/
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:12900/;
}
location /
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL http://graylog.example.org/api;
proxy_pass http://127.0.0.1:9000;
}
}
server
{
listen 443 ssl spdy;
server_name ess-lon-graylogweb-001;
ssl_certificate
ssl_certificate_kex
location /api/
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:12900/;
}
location /
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL https://ess-lon-graylogweb-001/api;
proxy_pass http://127.0.0.1:9000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment