How to secure graylog web interface with apache2

Hi,

I want to secure my graylog server web interface with apache.
I configured my apache configuration file in https but when I navigate to url with the name of my server, it shows me the default apache page, which is well secured with my certificate.
Someone to help me please!

This is my apache configuration apache:

 <VirtualHost *:80>
    ServerName domainname
    ServerAlias www.domainname
    # Redirection 301  vers le site en HTTPS
    Redirect permanent / https:/domainname/
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/
    ServerName domainname
    ServerAlias www.domainname
#       <Directory />
#               Options -Indexes +FollowSymLinks +MultiViews
#               AllowOverride none
#               Require all granted
#       </Directory>

       # directives obligatoires pour TLS
        SSLEngine on
        SSLCertificateFile    /etc/ssl/
        SSLCertificateKeyFile   /etc/ssl/

        ErrorLog /var/log/apache2/error.example.com.log
        CustomLog /var/log/apache2/access.example.com.log combined

</VirtualHost>

Default apache page:

Can you help me please!

Hey @Kamsy

You may want to look at this documentation below.

Making the Web Interface Work with Load Balancers/Proxies

I have an old configuration with Apache/Httpd.

Maybe it might help

<VirtualHost *:443>
    ServerName graylog.domain.com
    ProxyRequests Off
    SSLEngine on
    SSLOptions +StrictRequire
    SSLCertificateFile "/etc/graylog/graylog3-certificate.pem"
    SSLCertificateKeyFile "/etc/graylog/graylog3-key.pem"
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^10\.10\.10\.10$ [NC,OR]
    RewriteRule .* https://graylog.domain.com:9000 [R,L]
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    <Location />
        RequestHeader set X-Graylog-Server-URL "https://graylog.domain.com/"
        ProxyPass  https://graylog.domain.com:9000/
        ProxyPassReverse  https://graylog.domain.com:9000/
    </Location>

</VirtualHost>

I have been using nginx lately, because is seams easier to setup.

Hi !
This config not work for me.

Why in your config file, you don’t precise the DocumentRoot to access to your web inteface/API REST of graylog.

Can you send me your config file with nginx please!

hey @Kamsy

I use this example here.

Hi,

I have a question to answer you.
I want to known if i finish to configure my graylog web interface in https.
Do i must to uncomment these lines in graylog config file?

# Enable HTTPS support for the HTTP interface.
# This secures the communication with the HTTP interface with TLS to prevent request forgery and eavesdropping.
http_enable_tls = true

# The X.509 certificate chain file in PEM format to use for securing the HTTP interface.
http_tls_cert_file = /path/to/graylog-certificate.pem

# The PKCS#8 private key file in PEM format to use for securing the HTTP interface.
http_tls_key_file = /path/to/graylog-key.pem

# The password to unlock the private key used for securing the HTTP interface. (if key is encrypted)
http_tls_key_password = secret

Hey @Kamsy

Yes you do.

1 Like

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