4

I just recently installed Ubuntu 14.04.

I am now setting up my LAMP stack using this guide, and on starting apache2 I'm getting some errors:

$ sudo service apache2 restart
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

$ sudo netstat -lnpt
tcp  0  0  0.0.0.0:80 LISTEN 21254/nginx

Aha! So Nginx is the culprit! After some searching, I find in this blog post that Nginx is a new server, providing the same functionality (more or less?) as Apache. It must have come packaged with Ubuntu 14.04(?). I am a very new web-dev in training, and just want Apache for running Ruby on Rails apps etc.

I now want to replace Nginx with Apache.

I found and tried the answers to How to remove nginx and re activate apache? and Cannot remove NGINX

but all commands result in

Package 'nginx' is not installed, so not removed

Can anyone help me totally remove Nginx so I can get Apache working?

Zanna
  • 70,465
Pete
  • 51
  • nginx does not come packaged with Ubuntu 14.04. – Doug Smythies Feb 12 '15 at 23:45
  • hmm - maybe it installed with GitLab... when I go to localhost:80, GitLab shows up! – Pete Feb 13 '15 at 00:11
  • @PeterJacobson Yes, nginx is part of the Gitlab omnibus package. See https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md#using-a-non-bundled-web-server – muru Feb 13 '15 at 04:51

1 Answers1

1

Ok, so I followed the instructions in a forum (sorry, lost the url) for running apache2 WITH Nginx.

I changed the apache listening ports from 80 to 81 in

/etc/apache2/ports.conf

and

/etc/apache2/sites-enabled/000-default.conf

Apache2 is now working, tested by typing localhost:81 into the browser! Woohoo!

Pete
  • 51