Nginx Configuration

Instructions to configure the Avo Assure Nginx Server

Prerequisites

  1. Ensure Webserver (avoassurewebserver.exe) is running.

  2. Ensure File server (avoassurefileserver.exe) is running.

  3. Ensure NGINX_ON value is set to TRUE in the ‘webapp/.env’ file.

  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.

5. If the above point is not performed due to admin issues, navigate to ‘./nginx/config/nginx.conf’.

6. Locate ‘upstream avoassure’.

7. Change server avoassure.com:<port> to server 127.0.0.1:<port> and save.

8. Locate ‘upstream patchupdate’.

9. Change server avoassure.com:<port> to server 127.0.0.1:<port> and save.

Starting the Server

  1. Open an elevated command prompt in the ‘nginx’ folder.

  2. Type ‘nginx-start.bat’ and hit enter.

3. Upon successful start, nginx.exe will be running as a process (can be observed in Task Manager).

Stopping the Server

  1. Open an elevated command prompt in the ‘nginx’ folder.

  2. Type ‘nginx-stop.bat’ and hit enter.

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. Open an elevated command prompt in the ‘nginx’ folder.

  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.

Starting the Window Service

  1. Open an elevated command prompt in the ‘nginx’ folder. Note: AvoAssureNGINX service should already be installed.

  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.

Stopping the Window Service

  1. Open an elevated command prompt in the 'nginx' folder. Note: AvoAssureNGINX service should be in the running state.

  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.

Removing the Window Service

  1. Open an elevated command prompt in the ‘nginx’ folder. Note: AvoAssureNGINX service should be in the stopped state.

  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.

Restarting the Window Service

  1. Open an elevated command prompt in the ‘nginx’ folder.

  2. Run the following commands in sequential order i.e., only after the previous command has been completed:

    1. Type ‘nodeserver_nginx_services_stop.bat’ and hit enter.

    2. Type ‘nodeserver_nginx_services_remove.bat’ and hit enter.

    3. Type ‘nodeserver_nginx_services_install.bat’ and hit enter.

    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. Commands are being run with an elevated command prompt (i.e., prompt has Administrator privileges).

  2. Ensure port 80 and 443 (or any custom selected port) is available and not used by any other program.

  3. Ensure known hosts file is updated.

  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. Valid: D:\AvoAssure\Server\WebServer\nginx

    2. Invalid: D:\AvoAssure install files\Server\WebServer\nginx

    3. Invalid: D:\AvoAssure\Server@files\WebServer\nginx

  5. If all the above scenarios hold true and the server is still not running, please contact Avo Assure Support Team.

Last updated