After install MODEP, How to install nginx?

Dear,

After install MODEP, I would like to use nginx but I show some fail message.

So, how to make it possible?
What kind of webserver MODEP are using at 80?
How to config to change port of MODEP?

Best regards,
Uno LEE

Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.
invoke-rc.d: initscript nginx, action “start” failed.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-05-21 11:31:37 BST; 80ms ago
Docs: man:nginx(8)
Process: 10909 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 10910 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)

May 21 11:31:35 patchbox systemd[1]: Starting A high performance web server and a reverse proxy server…
May 21 11:31:35 patchbox nginx[10910]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 21 11:31:35 patchbox nginx[10910]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 21 11:31:36 patchbox nginx[10910]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 21 11:31:36 patchbox nginx[10910]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 21 11:31:37 patchbox nginx[10910]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 21 11:31:37 patchbox nginx[10910]: nginx: [emerg] still could not bind()
May 21 11:31:37 patchbox systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
May 21 11:31:37 patchbox systemd[1]: nginx.service: Failed with result ‘exit-code’.
May 21 11:31:37 patchbox systemd[1]: Failed to start A high performance web server and a reverse proxy server.
dpkg: error processing package nginx-full (–configure):
installed nginx-full package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-full (<< 1.14.2-2+deb10u1.1~) | nginx-light (<< 1.14.2-2+deb10u1.1~) | nginx-extras (<< 1.14.2-2+deb10u1.1~); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.14.2-2+deb10u1) | nginx-light (>= 1.14.2-2+deb10u1) | nginx-extras (>= 1.14.2-2+deb10u1); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.

dpkg: error processing package nginx (–configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.5-2) …
Processing triggers for systemd (241-7~deb10u4+rpi1) …
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi, mod-ui is running Tornado Web Server, using Python3.

You may change the port used by MODEP by changing modep-mod-ui.service file, reloading the configuration and restarting the service:

  1. Copy the modep-mod-ui.service file that comes with modep-mod-ui deb package into a location on the system that will override the original contents:

    sudo cp /lib/systemd/system/modep-mod-ui.service /etc/systemd/system/modep-mod-ui.service
    
  2. Edit the new file:

    sudo nano /etc/systemd/system/modep-mod-ui.service
    
  3. Change ‘80’ to the desired value in this line:

    Environment=MOD_DEVICE_WEBSERVER_PORT=80
    
  4. Ctrl+X, then Y to save and exit. Reload the systemd config and restart the service:

    sudo systemctl daemon-reload
    sudo systemctl restart modep-mod-ui
    

Now, let’s say we used ‘8080’ value, from now on MOD UI will be accessible using ‘http://localhost:8080’ (or IP of Raspberry Pi instead of ‘localhost’ in case using external computer).

And finally, you may fix the stuck nginx install using this command:

sudo dpkg --configure -a