2014-01-13 8 views
0

방금 ​​CentOS 6.5 서버를 설치했고 nginx에 설치했습니다.SELINUX를 사용할 수 없기 때문에 외부에서 nginx에 연결할 수 없습니다.

SELINUX를 비활성화하고 서버를 다시 시작했지만 호스트 자체를 제외한 다른 서버에서 nginx에 연결할 수 없습니다.

이 내 nginx를 구성입니다 :

# For more information on configuration, see: 
# * Official English Documentation: http://nginx.org/en/docs/ 
# * Official Russian Documentation: http://nginx.org/ru/docs/ 

user    nginx; 
worker_processes 4; 

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  /etc/nginx/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; 

    #gzip on; 

    # Load config files from the /etc/nginx/conf.d directory 
    # The default server is in conf.d/default.conf 
    include /etc/nginx/conf.d/*.conf; 

} 

내가 잘못 뭐하는 거지?

답변

0

해결되었지만 들어오는 연결을 모두 차단하고있는 IPTABLES의 규칙이 있습니다.

iptables -L INPUT -n --line-numbers 
iptables -D INPUT <N> 
service iptables save 
service iptables restart 

이 문제를 해결했습니다.

관련 문제