NGINX Configuration

To configure SSL in NGINX, we typically use a reverse proxy configuration. Here's how do it

For Influx DB

  1. Create a Configuration File: You'll need to create a new configuration file in /etc/nginx/sites-available directory.

    sudo nano /etc/nginx/sites-available/influx.example.com

    Replace influx.example.com with a name for your site.

  2. Configure NGINX: In the configuration file, you'll set up a reverse proxy to pass requests from NGINX to your influx service running on port 8086.

    server {
        listen 80;
        server_name influx.example.com; # Change this to your actual domain
    
        location / {
            proxy_pass http://localhost:8086; # InfluxDB address
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }

    Make sure to replace influx.example.com with your actual domain name or server IP address.

  3. Enable the Configuration: Create a symbolic link to enable your configuration file in the sites-enabled directory:

    sudo ln -s /etc/nginx/sites-available/influx.example.com /etc/nginx/sites-enabled/
  4. Test Configuration: Before restarting NGINX, it's a good idea to check if your configuration syntax is correct:

    sudo nginx -t
  5. Reload NGINX: If the test is successful, reload NGINX to apply the changes:

    sudo systemctl reload nginx

For Grafana

  1. Create a Configuration File: You'll need to create a new configuration file in /etc/nginx/sites-available directory.

    Replace influx.example.com with a name for your site.

  2. Configure NGINX: In the configuration file, you'll set up a reverse proxy to pass requests from NGINX to your influx service running on port 8086.

    Make sure to replace influx.example.com with your actual domain name or server IP address.

  3. Enable the Configuration: Create a symbolic link to enable your configuration file in the sites-enabled directory:

  4. Test Configuration: Before restarting NGINX, it's a good idea to check if your configuration syntax is correct:

  5. Reload NGINX: If the test is successful, reload NGINX to apply the changes:

Last updated