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.

OS: CentOS 6.5 (Final)
Panel Version: 11.5.30

I'm using Plesk and turned on the nginx service. Now my sites are pointing to the Apache page. I have also looked at the errors within the nginx error log but I really don't know where to go from there.

This is what I am getting in the error log:

2014/02/03 22:01:57 [notice] 12123#0: using inherited sockets from "6;7;"
2014/02/04 11:43:49 [emerg] 888#0: bind() to IP:80 failed (99: Cannot assign requested address)

Where IP is my IP Address. Here below is my nginx.conf file:

#user  nginx;
worker_processes  1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;


events {
 worker_connections  1024;
}


http {
   include       mime.types;
    default_type  application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  /var/log/nginx/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;
#tcp_nodelay        on;

#gzip  on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server_tokens off;

include /etc/nginx/conf.d/*.conf;
}
share|improve this question
    
Where's your server { block? –  Nathan C Feb 4 at 18:24
    
Some process already listening IP:80. Just findout it by netstat -anp | grep :80 –  Oleg Neumyvakin Feb 5 at 9:40

1 Answer 1

This is because you have mess the configuration using plesk 'repair' scripts. To solve this, make sure that in /etc/apache2/ports.conf ports are set correctly, instead of 80 set to 7080 and for 443(ssl) use 7081. Change the assigned ports for apache, and run httdmng --reconfigure-server, then start apache and nginx. Httpdmng is located in /usr/local/psa/admin/sbin. Good luck

share|improve this answer

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.