Question

Get failure installing Nginx in Ubuntu 16.04

I’ve read other questions but didn’t find an answer to my issue. Also as newbie I’m more lost than usual.

Well the problem is that trying to install Nginx and trying to see if ufw status get status: inactive

After this I write systemctl status nginx and get the next result:

pipo@pipo-X542UV:~$ sudo  systemctl status nginx
● 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 mar 2018-02-06 17:39:07 CET; 14min ago

 feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to 
 [::]:80 failed (98: Address already in use)
 feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to 
 0.0.0.0:80 failed (98: Address already in us
 feb 06 17:39:06 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to 
 [::]:80 failed (98: Address already in use)
 feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to 
 0.0.0.0:80 failed (98: Address already in us
 feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] bind() to 
 [::]:80 failed (98: Address already in use)
 feb 06 17:39:07 pipo-X542UV nginx[27941]: nginx: [emerg] still could 
 not bind()
 feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Control 
 process exited, code=exited status=1
 feb 06 17:39:07 pipo-X542UV systemd[1]: Failed to start A high 
 performance web server and a reverse proxy serve
 feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Unit entered 
 failed state.
 feb 06 17:39:07 pipo-X542UV systemd[1]: nginx.service: Failed with 
 result 'exit-code'.
 lines 1-14/14 (END)

Have tried several times uninstalling and installing again

What I’m doing wrong?

Thanks in advance!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

sudo nginx -t will show you the errors if any that may exist in your configuration file(s).