Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I edited this file:

/etc/nginx/sites-enabled/default

to listen 4444; - https://dpaste.de/nrUy9/

but still is on port 80. What can I do? Port 80 is used by apache.

My error:

root@user /etc/nginx/sites-enabled # service nginx restart
Restarting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
nginx.
share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

remove the IPv6 bind block (something along the lines of ::1:80

share|improve this answer
    
Thanks. Could you explain where exactly? –  user2426362 Jul 3 '13 at 13:52
    
cd /etc/nginx && grep -R listen * will show you where –  thanasisk Jul 3 '13 at 14:12
    
Thanks, now my sites work good on domain.com:33333 (port). How to change it to work without :33333 –  user2426362 Jul 3 '13 at 14:23
    
Can you rephrase the question please? –  thanasisk Jul 3 '13 at 14:23
    
I changed default port in nginx (from 80 to 33333). Now all my websites running on nginx work good only If I run in browser domain.com:33333. If I run domain.com did not work. How to fix it? –  user2426362 Jul 3 '13 at 14:26
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.