I cannot install Nginx on One Click Install Wordpress

January 22, 2018 706 views
Nginx One-Click Install Apps WordPress Let's Encrypt Ubuntu 16.04

Disclaimer : I am kinda newbie, entirely learned setting up servers thru tutorials.

I already have a droplet with One Click LAMP installed where I am not facing below issue & I was able to get Let's Encrypt SSL for my domain.

After creating new One Click Wordpress instance for my new domain, when I tried ssh root@droplet.ip.address, I got following error Permission denied (publickey).. I assigned SSH key of previous droplet while creating One Click wordpress droplet.

Though I was still able to install wordpress thru browser, I created sudo user as suggested in https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 but after these was not able to install Nginx which is needed for getting Let's Encrypt SSL.

Can someone suggest me which tutorials should i refer to resolve this error?

When I try installing Nginx via sudo apt-get install nginx I get following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx is already the newest version (1.10.3-0ubuntu0.16.04.2).
The following packages were automatically installed and are no longer required:
  augeas-lenses letsencrypt libaugeas0 python-augeas
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
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 Sun 2018-01-21 20:09:15 UTC; 8ms ago
  Process: 17681 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
  Process: 17676 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)

Jan 21 20:09:13 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] listen() to [:...)
Jan 21 20:09:14 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] listen() to 0....)
Jan 21 20:09:14 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] listen() to [:...)
Jan 21 20:09:14 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] listen() to 0....)
Jan 21 20:09:14 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] listen() to [:...)
Jan 21 20:09:15 mblive-wordpress-s-1vcpu-1gb-blr1-01 nginx[17681]: nginx: [emerg] still could no...)
Jan 21 20:09:15 mblive-wordpress-s-1vcpu-1gb-blr1-01 systemd[1]: nginx.service: Control process ...1
Jan 21 20:09:15 mblive-wordpress-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start A high performa....
Jan 21 20:09:15 mblive-wordpress-s-1vcpu-1gb-blr1-01 systemd[1]: nginx.service: Unit entered fai....
Jan 21 20:09:15 mblive-wordpress-s-1vcpu-1gb-blr1-01 systemd[1]: nginx.service: Failed with resu....
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-core (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.10.3-0ubuntu0.16.04.2) | nginx-full (>= 1.10.3-0ubuntu0.16.04.2) | nginx-light (>= 1.10.3-0ubuntu0.16.04.2) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.2); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.2.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-certbot-nginx:
 python-certbot-nginx depends on nginx; however:
  Package nginx is not configured yet.
  Package nginNo apport report written because the error message indicates its a followup error from a previous failure.
                    No apport report written because the error message indicates its a followup error from a previous failure.
                          x-core which provides nginx is not configured yet.

dpkg: error processing package python-certbot-nginx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 nginx-core
 nginx
 python-certbot-nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 Answer

You cannot run two web servers on the same ports on one server. The WordPress one-click includes the Apache web server. We would recommend using a fresh server if you would prefer to run Nginx. You can instead remove Apache from the server but this will require you to configure Nginx just as you would on a new server.

WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and...
  • Thanks for the reply :)
    But I figured this out. Made a new ubuntu droplet & manually installed LEMP. Now everything is working.

Have another answer? Share your knowledge.