Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

upstream udmg_auth_proxy {
# UDMG Auth Proxy Configuration
    server        localhost:5000;
    ip_hash;
    keepalive 10;    
}

server {
    listen        80;

    listen    [::]80;

#    listen        443 ssl;
#    ssl_certificate /etc/udmg/certs/udmg.pem;

#    ssl_certificate_key /etc/udmg/certs/udmg.key;
#    ssl_session_timeout 5m;
#    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#    ssl_protocols TLSv1.2;
#    ssl_prefer_server_ciphers on;

    server_name   localhost;

    access_log    /opt/udmg/var/log/nginx/admin.log main;

    location /service/ {
      proxy_pass         http://udmg_auth_proxy/;
      proxy_set_header   X-Real-IP       $remote_addr;
      proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

    }

    location / {
        try_files $uri $uri/ /index.html;
        root      /opt/udmg/var/www/udmg;
    }
}


Note
titleNote

Debian/Ubuntu: the main log format is not defined (commented out in /etc/nginx/nginx/conf) when the installation is performed from the Debian package repository. It is necessary to either revert the access_log format to the default by removing the main from the example above or to uncomment it from the nginx.conf file. It is also possible to install the package from the NGINX official repository, which defines the main log format.  

  • Remove any /etc/nginx/conf.d/default.conf file, to disable the NGINX default landing page on port 80.
  • Validate that the configuration is correct with the following command:

...