Avo Assure - Master User Guide v23.2.0
Search
K
Comment on page

Nginx Configuration

Instructions to configure the Avo Assure Nginx Server

Prerequisites

  1. 1.
    Ensure Webserver (avoassurewebserver.exe) is running.
  2. 2.
    Ensure File server (avoassurefileserver.exe) is running.
  3. 3.
    Ensure NGINX_ON value is set to TRUE in the ‘webapp/.env’ file.
  4. 4.
    Navigate to ‘C:\Windows\System32\drivers\etc\hosts’. Add the following at the end of the file 127.0.0.1 avoassure.com (Note: Do not change any other content). Admin access is required to make this change.
Configuring known Host File
5. If the above point is not performed due to admin issues, navigate to ‘./nginx/config/nginx.conf’.
Nginx Configuration File Location
6. Locate ‘upstream avoassure’.
Upstream Avoassure Location in nginx.conf
7. Change server avoassure.com:<port> to server 127.0.0.1:<port> and save.
Configuring Upstream Avoassure in nginx.conf
8. Locate ‘upstream patchupdate’.
Upstream Patchupdate Location in nginx.conf
9. Change server avoassure.com:<port> to server 127.0.0.1:<port> and save.
Configuring Upstream Patchupdate in nginx.conf

Starting the Server

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder.
  2. 2.
    Type ‘nginx-start.bat’ and hit enter.
Starting Nginx
3. Upon successful start, nginx.exe will be running as a process (can be observed in Task Manager).

Stopping the Server

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder.
  2. 2.
    Type ‘nginx-stop.bat’ and hit enter.
Stopping Nginx
3. Upon successful stop, nginx.exe will not be running as a process (can be observed in Task Manager). Alternately, type 'taskkill /F /IM nginx.exe' in the elevated command prompt.

Installing the Server as a Window Service

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder.
  2. 2.
    Type nodeserver_nginx_services_install.bat and hit enter. Note: nodeserver_nginx_services_install.bat will attempt to install avoassurewebserver.exe service if it is not already installed.
Installing Nginx as a Service

Starting the Window Service

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder. Note: AvoAssureNGINX service should already be installed.
  2. 2.
    Type ‘nodeserver_nginx_services_start.bat’ and hit enter. Note: nodeserver_nginx_services_start.bat will attempt to start avoassurewebserver.exe service if it is not already started.
Starting Nginx as a Service

Stopping the Window Service

  1. 1.
    Open an elevated command prompt in the 'nginx' folder. Note: AvoAssureNGINX service should be in the running state.
  2. 2.
    Type nodeserver_nginx_services_stop.bat and hit enter. Note: nodeserver_nginx_services_start.bat will attempt to stop avoassurewebserver.exe service if it is not already stopped.
Stopping Nginx Service

Removing the Window Service

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder. Note: AvoAssureNGINX service should be in the stopped state.
  2. 2.
    Type ‘nodeserver_nginx_services_remove.bat’ and hit enter. Note: nodeserver_nginx_services_start.bat will attempt to remove the avoassurewebserver.exe service if it is not already removed.
Removing Nginx Service

Restarting the Window Service

  1. 1.
    Open an elevated command prompt in the ‘nginx’ folder.
  2. 2.
    Run the following commands in sequential order i.e., only after the previous command has been completed:
    1. 1.
      Type ‘nodeserver_nginx_services_stop.bat’ and hit enter.
    2. 2.
      Type ‘nodeserver_nginx_services_remove.bat’ and hit enter.
    3. 3.
      Type ‘nodeserver_nginx_services_install.bat’ and hit enter.
    4. 4.
      Type ‘nodeserver_nginx_services_start.bat’ and hit enter.

Troubleshooting

In case any of the above-mentioned steps fail, ensure the following points have been taken care of:
  1. 1.
    Commands are being run with an elevated command prompt (i.e., prompt has Administrator privileges).
  2. 2.
    Ensure port 80 and 443 (or any custom selected port) is available and not used by any other program.
  3. 3.
    Ensure known hosts file is updated.
  4. 4.
    There are no spaces or special characters (such as ! @ # $ % ^ & ( ) + - = { } , . ; ' [ ] ~ `) in the folder name (and entire path) where the WebServer is being extracted. Example:
    1. 1.
      Valid: D:\AvoAssure\Server\WebServer\nginx
    2. 2.
      Invalid: D:\AvoAssure install files\Server\WebServer\nginx
    3. 3.
      Invalid: D:\AvoAssure\Server@files\WebServer\nginx
  5. 5.
    If all the above scenarios hold true and the server is still not running, please contact Avo Assure Support Team.