# Configuration HTTPS

**URL:** <https://community.graylog.org/t/configuration-https/4872>\
**Category:** Graylog Central (peer support)\
**Created:** [April 5, 2018, 9:22am UTC](https://community.graylog.org/t/configuration-https/4872 "2018-04-05T09:22:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 5, 2018, 9:22am UTC](https://community.graylog.org/t/configuration-https/4872/1 "2018-04-05T09:22:04Z")

</div>

Hello,  
I’m new user on graylog and i try to put the HTTPS in place but is not successful.  
I am not comfortable with https certificates  
I use a single nœd  
I did this on file openssl-graylog.cnf :

```nohighlight
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = FR
ST = t
L = t
O = i
OU = myn
CN = graylog

[v3_req]
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
.
[alt_names]
IP.1 = my_ip_graylog_machine
#DNS.1 = graylog.example.com (I comment this line because I will not use DNS resolution)

```

after that i do this:

```nohighlight
openssl req -x509 -days 365 -nodes -newkey rsa:2048 -config openssl-graylog.cnf -keyout pkcs5-plain.pem -out cert.pem

openssl pkcs8 -in pkcs5-plain.pem -topk8 -nocrypt -out pkcs8-plain.pem

openssl pkcs8 -in pkcs5-plain.pem -topk8 -out pkcs8-encrypted.pem -passout pass:secret

```

after this commande i got : cert.pem pkcs5-plain.pem pkcs8-encrypted.pem pkcs8-plain.pem

and on the file /etc/graylog/server.conf i do this :

```nohighlight
web_listen_uri = https://my_ipgraylog_machine:9000/
web_enable_tls = true
web_tls_cert_file = /etc/graylog/server/certfiles/cert.pem
web_tls_key_file = /etc/graylog/server/certfiles/pcks8-plain.pem
web_tls_key_password = secret

rest_transport_uri = https://my_ipgraylog_machine:9000/api/
rest_listen_uri = https://my_ipgraylog_machine:9000/api/
rest_tls_cert_file = /etc/graylog/server/certfiles/cert.pem
rest_tls_key_file = /etc/graylog/server/certfiles/pcks8-plain.pem
rest_tls_key_password = secret

```

this is all I did

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [April 5, 2018, 9:48am UTC](https://community.graylog.org/t/configuration-https/4872/2 "2018-04-05T09:48:54Z")

</div>

> [@Corentin](#):
>
> this is all I did

Please elaborate on what doesn’t work and include all necessary information, such as error messages and the complete output of the commands you’ve been executing.

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 5, 2018, 1:00pm UTC](https://community.graylog.org/t/configuration-https/4872/4 "2018-04-05T13:00:29Z")

</div>

Hello  
I cant access https://my\_ip\_graylog\_machine:9000/ , my web browser tell me this:

" Sorry, we can not reach this page  
Error Code : INET\_E\_RESOURCE\_NOT\_FOUND "

I don’t know where i can get a better error message.  
I have test https://my\_ip\_graylog\_machine this work.

Output of the commands executed

![graylog_forum_1](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/6/67931eac09ef4db8c3b5551725580f88a13f190f.png)

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [April 5, 2018, 1:23pm UTC](https://community.graylog.org/t/configuration-https/4872/5 "2018-04-05T13:23:32Z")

</div>

What is “my\_ip\_graylog\_machine” specifically?

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 5, 2018, 1:26pm UTC](https://community.graylog.org/t/configuration-https/4872/6 "2018-04-05T13:26:59Z")

</div>

it’s the server ip (192.168.1.1)

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 9, 2018, 9:39am UTC](https://community.graylog.org/t/configuration-https/4872/7 "2018-04-09T09:39:31Z")

</div>

I got this error message now  
We can not safely access this page  
This site uses outdated or insecure TLS security settings. If the problem persists, try contacting the owner.

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [April 9, 2018, 11:43am UTC](https://community.graylog.org/t/configuration-https/4872/8 "2018-04-09T11:43:38Z")

</div>

your certificate might not match your requested hostname

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 9, 2018, 1:11pm UTC](https://community.graylog.org/t/configuration-https/4872/9 "2018-04-09T13:11:12Z")

</div>

When you said hostname you speak about what I put in the URL link? (i try to access by the ip 192.168.1.1:9000)

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [April 9, 2018, 1:15pm UTC](https://community.graylog.org/t/configuration-https/4872/10 "2018-04-09T13:15:21Z")

</div>

in term of http protocol you request a hostname - that might be an ip or a name - that used named need to be part of the certificate the web server provide that the browser can verify that.

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 10, 2018, 7:30am UTC](https://community.graylog.org/t/configuration-https/4872/11 "2018-04-10T07:30:13Z")

</div>

Ok, but I do not understand why when, I test with the ip without the port graylog 9000 the https work.  
request ([https://192.168.1.1](https://192.168.1.1))  
Result :

 ![https_work](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/4/4bef30f70f002d2f2678616325de9c4cc6b434d3.PNG)

And for the request ([https://192.168.1.1:9000](https://192.168.1.1:9000))

Result :  
We can not safely access this page  
This site uses outdated or insecure TLS security settings. If the problem persists, try contacting the owner.

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [April 10, 2018, 8:53am UTC](https://community.graylog.org/t/configuration-https/4872/12 "2018-04-10T08:53:34Z")

</div>

I think on port 443 you have some kind of web server running (nginx or apache) and on port 9000 you have graylog handling the web traffic itself.

You might need to adjust the ciphers for your environment ( [http://docs.graylog.org/en/2.4/pages/securing.html#configuring-tls-ciphers](http://docs.graylog.org/en/2.4/pages/securing.html#configuring-tls-ciphers) )

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 10, 2018, 9:54am UTC](https://community.graylog.org/t/configuration-https/4872/13 "2018-04-10T09:54:10Z")

</div>

Https now work on 192.168.1.1:9000 but I see the default httpd page.  
Maybe a need to put a DocumentRoot option but put what path

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [April 10, 2018, 11:01am UTC](https://community.graylog.org/t/configuration-https/4872/14 "2018-04-10T11:01:48Z")

</div>

if you see the default document root you should need to configure your webserver in the right way:

[http://docs.graylog.org/en/2.4/pages/configuration/web\_interface.html#nginx](http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#nginx)

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 10, 2018, 1:18pm UTC](https://community.graylog.org/t/configuration-https/4872/15 "2018-04-10T13:18:06Z")

</div>

I using Apache HTTP  
My config actualy is

ssl.conf:

```nohighlight
Listen 9000 https
Listen 443 https

SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog

SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300

SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin

SSLCryptoDevice builtin

<VirtualHost *:443>

ServerName 192.168.1.1
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

SSLEngine on

SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA

SSLCertificateFile /etc/certfiles/graylog.cert.pem
SSLCertificateKeyFile /etc/certfiles/graylog.pkcs8-plain.key.pem

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>

<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

<VirtualHost *:9000>

    ServerName 192.168.1.1
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn
    SSLEngine on
    SSLProtocol all -SSLv3
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA    
    SSLHonorCipherOrder on
    SSLProtocol all -SSLv2
    SSLCertificateFile /etc/certfiles/graylog.cert.pem
    SSLCertificateKeyFile /etc/certfiles/graylog.pkcs8-plain.key.pem

    # HSTS (mod_headers is required) (15768000 seconds = 6 months)
    Header always set Strict-Transport-Security "max-age=15768000"
# <Proxy *>
# Order deny,allow
# Allow from all
# </Proxy>
#
# <Location />
# RequestHeader set X-Graylog-Server-URL "https://192.168.1.1/api/"
# ProxyPass http:///192.168.1.1:9000/
# ProxyPassReverse http://192.168.1.1:9000/
# </Location>
(I have commented on these lines because I'm not sure to need that)
</VirtualHost>

```

And Server.conf :

```nohighlight

web_listen_uri = https://192.168.1.1:9000/api/
web_endpoint_uri = https://192.168.1.1:9000/api/
web_enable_tls = true
web_tls_cert_file = /etc/certfiles/graylog.cert.pem
web_tls_key_file = /etc/certfiles/graylog.pkcs8-plain.key.pem
web_tls_key_password = secret 

rest_listen_uri = https://192.168.1.1:9000/api/
rest_transport_uri = https://192.168.1.1:9000/api/
rest_enable_tls = true
rest_tls_cert_file = /etc/certfiles/graylog.cert.pem
rest_tls_key_file = /etc/certfiles/graylog.pkcs8-plain.key.pem
rest_tls_key_password = secret

```

it doesn’t work, but I don’t see what is wrong. 😟

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [April 10, 2018, 1:42pm UTC](https://community.graylog.org/t/configuration-https/4872/16 "2018-04-10T13:42:50Z")

</div>

please read: [http://docs.graylog.org/en/2.4/pages/configuration/web\_interface.html#making-the-web-interface-work-with-load-balancers-proxies](http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#making-the-web-interface-work-with-load-balancers-proxies)

adjust it to your environment and use the configuration example provided ( [http://docs.graylog.org/en/2.4/pages/configuration/web\_interface.html#apache-httpd-2-x](http://docs.graylog.org/en/2.4/pages/configuration/web_interface.html#apache-httpd-2-x) ) - currently you have Apache _AND_ Graylog listening on port 9000 - which isn’t possible in a common linux setup (on the same interface/ip).

---

<div class="post-metadata">

**Author:** ![Corentin](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Corentin](https://community.graylog.org/u/Corentin)\
**Post date:** [April 12, 2018, 2:18pm UTC](https://community.graylog.org/t/configuration-https/4872/17 "2018-04-12T14:18:39Z")

</div>

I read that, I tried but it does not work I leave the https aside for the moment.  
For graylog httpd is useless i can remove this package no ?

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [April 12, 2018, 2:57pm UTC](https://community.graylog.org/t/configuration-https/4872/18 "2018-04-12T14:57:41Z")

</div>

> [@Corentin](#):
>
> For graylog httpd is useless i can remove this package no ?

If you don’t want to use Apache httpd as a reverse proxy for Graylog, it’s not required and you could remove it from your machine.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [April 26, 2018, 3:07pm UTC](https://community.graylog.org/t/configuration-https/4872/19 "2018-04-26T15:07:19Z")

</div>

Closed on April 26, 2018, 3:07pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
