Running gekko on a ubuntu server with apache
#6
Hi guys. Just installed it on nginx, this is my config file:



PHP Code:
upstream websocket {
   server localhost:3000;
}

server {

       listen 80 default_server;
       listen [::]:80 default_server;


   location / {
           proxy_buffers 8 32k;
           proxy_buffer_size 64k;

           proxy_pass http://websocket;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header Host $http_host;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-NginX-Proxy true;

           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";

           proxy_read_timeout 86400s;
           proxy_send_timeout 86400s;
           auth_basic "Restricted Content";
           auth_basic_user_file /etc/nginx/.htpasswd;

       }
} 

and this is my UIconfig.js


PHP Code:
const CONFIG = {
   headless: true,
   api: {
       host: '127.0.0.1',
       port: 3000,
   },
   ui: {
       ssl: false,
       host: '...',
       port: 80,
       path: '/' // change this if you are serving from something like `example.com/gekko`
   },
   adapter: 'sqlite'
}

if(
typeof window === 'undefined')
 module.exports = CONFIG;
else
 window.CONFIG = CONFIG; 


I want to run it over SSL, I generated an SSL cert with letsencrypt like I usually do and placed it in the nginx conf, but it just times out. Does anyone have a working example of an nginx conf and UIconfig.js with SSL enabled? I think there's some issue with the reverse proxy.

This is my config with https on:

PHP Code:
server {
    listen 80;
    listen [::]:80;
    server_name ...;
    return 301 https://$server_name$request_uri;
}

upstream websocket {
    server localhost:3000;
}

server {

    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    root /var/www/html;
    ssl_certificate /etc/letsencrypt/live/.../fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/.../privkey.pem;

    location / {

        proxy_buffers 8 32k;
        proxy_buffer_size 64k;

        proxy_pass http://websocket;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
    }
} 
  Reply


Messages In This Thread
RE: Running gekko on a ubuntu server with apache - by cristi9313 - 02-14-2018, 02:18 PM

Forum Jump:


Users browsing this thread: