Topic: Problem Nginx
==== Required information ====
- iRedMail version (check /etc/iredmail-release): Latest, installed yesterday (9.0.6)
- Linux/BSD distribution name and version: VPS running debian 8 (wheezie)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (checked that during installation)
- Web server (Apache or Nginx): Not sure, i've seen both installed on my server.
- Manage mail accounts with iRedAdmin-Pro? none
- Related log if you're reporting an issue:
Hello, I installed Iredmail and at the end I have had an error. Now my nginx is saying it has an error on startup. Here is the error I have :
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
root@vps359601:~# /etc/init.d/nginx restart
[....] Restarting nginx (via systemctl): nginx.serviceJob for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
failed!
The status of nginx :
root@vps359601:~# /etc/init.d/nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Fri 2017-01-27 01:24:07 CET; 53s ago
Process: 17514 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 17513 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Jan 27 01:24:06 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 27 01:24:06 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 27 01:24:06 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 27 01:24:06 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 27 01:24:07 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 27 01:24:07 vps359601.ovh.net nginx[17514]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Jan 27 01:24:07 vps359601.ovh.net systemd[1]: nginx.service: control process exited, code=exited status=1
Jan 27 01:24:07 vps359601.ovh.net systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Jan 27 01:24:07 vps359601.ovh.net systemd[1]: Unit nginx.service entered failed state.
Jan 27 01:24:07 vps359601.ovh.net nginx[17514]: nginx: [emerg] still could not bind()
And here is my /etc/nginx/nginx.conf file :
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Thanks for your help!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.