Commit 171e2fbb authored by Oliver Lowe's avatar Oliver Lowe
Browse files

Serve http with nginx in front of graylog server

graylog listens on localhost port 9000, so put nginx in front of it
so we get something safe and stable listening on port 80 to save
graylog itself running as root to listen on a privileged port
parent 757e1c6e
# Managed by ansible
server {
listen 80;
server_name _;
location / {
access_log off;
proxy_pass http://localhost:9000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
enabled: yes enabled: yes
state: restarted state: restarted
- name: restart nginx
service:
name: nginx
enabled: True
state: restarted
- name: restart graylog - name: restart graylog
service: service:
name: graylog-server name: graylog-server
......
...@@ -46,6 +46,19 @@ ...@@ -46,6 +46,19 @@
notify: notify:
- restart elasticsearch - restart elasticsearch
- name: install nginx
package:
name: nginx
notify:
- restart nginx
- name: configure nginx
copy:
src: nginx.conf
dest: /etc/nginx/sites-available/default
notify:
- restart nginx
- name: graylog apt repo - name: graylog apt repo
apt: apt:
deb: "https://packages.graylog2.org/repo/packages/graylog-3.2-repository_latest.deb" deb: "https://packages.graylog2.org/repo/packages/graylog-3.2-repository_latest.deb"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment