Nginx by default running on DigitalOcean Ubuntu 16.04

Background

So yesterday I was playing around with our server.

On it we have a docker-compose process running 6 or so containers, one of them being Nginx. Before I played around with it yesterday it was serving files just fine.

What I did

I noticed on DO, that I could upgrade my metrics by running curl -sSL https://agent.digitalocean.com/install.sh | sh. How cool right??

Well after I did that, weird stuff started happening. I cant be sure that it is causation, but it certainly is correlation.

What I tried

I have my DO droplet, and i run docker-compose up -d and I get a :

ERROR: for root_nginx_1 Cannot start service nginx: driver failed programming external connectivity on endpoint root_nginx_1: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use

Ok, thats weird...

It was working before and now it wont even start up?

I run ps aux -P | grep nginx to see what going on and get:

root      1514  0.0  0.1 124972  1388 ?        Ss   12:57   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data  1517  0.0  0.2 125332  2960 ?        S    12:57   0:00 nginx: worker process
root      5716  0.0  0.0  12944   940 pts/1    S+   13:16   0:00 grep --color=auto nginx

Hmm, why are there these other nginx processes?

ok, I then run pkill nginx to get rid of them and then again docker-compose up -d and everything startsup fine and dandy, no errors.

However, now when I go to my example.com site, I get no response.

Thinking it might be a config issue, I run docker logs root_nginx_1 and there is NOTHING. There should be at least some headers or requests being logged.

Then in a desperate final attempt I run sudo shutdown -r now and start the whole process over.

Same result with the nginx process running on the server.

So,

  1. Is it normal for this nginx process to be running on the server on startup?
  2. How can I get my nginx container to listen on port 80 without a conflict?
1
задан 25 July 2017 в 16:32
1 ответ

بعد اتباع نصيحةEEAA والبحث الفعلي عما كان يفعله وكيل DO ، فإنه بالفعل يستخدم المنفذين 80 و 443.

يستخدم وكيل DigitalOcean المنفذين 80 و 443 للصادرات البيانات. الوصول إلى الداخل غير مطلوب. نظرًا لأن الوكيل لا يستخدم سوى المنافذ للبيانات الصادرة ، يمكنك تشغيل خادم ويب بأمان دون تدخل.

يتم استخدام المنفذ 80 للاتصال بخدمة البيانات الوصفية لـ DigitalOcean للحصول على رمز المصادقة. يستخدم الوكيل هذا الرمز المميز للمصادقة عليه الواجهة الخلفية للمقاييس وتشفير عمليات الإرسال الخاصة بها. قائمة فعلت الحيلة.

هنا يمكنك ، وأنا أنصحك بذلك ، اقرأ كل شيء عنها.

0
ответ дан 4 December 2019 в 04:48

Теги

Похожие вопросы