Hello everyone. I know, a similar question has been discussed many times but nothing is working for me.
I want to use Graylog 4.0 and jwilder/nginx-proxy
According to jwilder/nginx-proxy documentation we must specify -e VIRTUAL_HOST=“mysubdomain.mydomain.com” and expose port
Based on that, I am using the following command to ran Graylog container
$ docker run --name mongo -d mongo:4.2
$ docker run --name elasticsearch \
-e "http.host=0.0.0.0" \
-e "discovery.type=single-node" \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
-d docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0
$ docker run --link mongo --link elasticsearch \
-u root \
-p 12201:12201 -p 1514:1514 -p 5555:5555 -p 9000:9000 \
-e GRAYLOG_HTTP_EXTERNAL_URI=http://mysubdomain.mydomain.com:9000/ \
-e VIRTUAL_HOST=mysubdomain.mydomain.com \
-e VIRTUAL_PORT=9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-d graylog/graylog:4.0
According to Graylog 4.0 documentation, http_external_uri is the public URI of Graylog which will be used by the Graylog web interface to communicate with the Graylog REST API. Graylog web interface.
When hitting https:/ /mysubdomain.mydomain.com, I am getting the error
Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS.
The index.html looks like
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex, nofollow">
<meta charset="UTF-8">
<title>Graylog Web Interface</title>
<link rel="shortcut icon" href="http://mysubdomain.mydomain.com/assets/favicon.png">
</head>
<body>
<script src="http://mysubdomain.mydomain.com/config.js"></script>
...
</body>
</html>
According to Graylog documentation :
- If the HTTP(S) client going to the web interface port sends a
X-Graylog-Server-URL
header, which contains a valid URL, then this is overriding everything else. - If
http_external_uri
is defined in the Graylog configuration file, this is used if the aforementioned header is not set.
So, I did not put X-Graylog-Server-URL to the nginx config file
What else needs to be configured to have it working?