Question

after installing iRedMail my nginx 404 error

i tried to install iRedMail and now all my domains are down. I didnt touch any blocks configuration files. i follow this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-iredmail-on-ubuntu-12-04-x64

the issue is i dont have /var/www/html folder at all. why its looking for “html” folder ? thanks

my error log

2015/02/20 11:57:59 [error] 2549#0: *3 open() "/var/www/html/html/phpmyadmin" failed (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET /html/phpmyadmin HTTP/1.1", host: "95.85.39.84"
2015/02/20 12:02:15 [error] 2549#0: *4 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:03:27 [error] 2549#0: *5 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:07:37 [error] 2549#0: *6 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:09:33 [error] 2549#0: *7 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:10:10 [error] 2739#0: *1 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:10:42 [error] 2739#0: *2 "/var/www/html/index.php" is not found (2: No such file or directory), client: 180.76.4.18, server: _, request: "GET / HTTP/1.1", host: "95.85.39.84"
2015/02/20 12:11:10 [error] 2739#0: *1 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:18:34 [error] 2819#0: *3 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "qbfweb.com"
2015/02/20 12:23:05 [error] 2898#0: *1 "/var/www/html/index.php" is not found (2: No such file or directory), client: 86.47.32.32, server: _, request: "GET / HTTP/1.1", host: "richmondgardens.ie"

here is my configuration block file :

server {
        listen   80;


        root /var/www/richmondgardens.ie;
        index index.php index.html index.htm;

        server_name richmondgardens.ie;

        location / {
                try_files $uri $uri/ /index.php?q=uri$args;
        }

        error_page 404 /404.html;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/www;
        }

        # pass the PHP scripts to FastCGI server listening on the php-fpm socket
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        }

}

i dont understand everything was working fine till now. I dont think installation of mail server can broke something.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

My guess here is that Nginx was not restarted after the virtual host block was created. You can check the Nginx configuration for any syntax errors and then restart the service.

To check the Nginx configuration:

  1. nginx -t

And then to restart Nginx:

  1. systemctl restart nginx.

And then check if the same error is still logged.

Hope that this helps!

This question was answered by @ryanpq:

The iRedMail installer expects that you are running it on a new clean server and not one you have already configured services on. The webmail and phpmyadmin portions of iRedMail will install and use apache and not nginx by default. The default web root for Apache is /var/www/html on Ubuntu 14.04. I would recommend setting up a separate droplet for your mail services.

I cannot say for sure but the installer may have simply set up apache and started it. Have you tried stopping the apache service and starting your nginx service to see if this helps?

service apache2 stop
service nginx start

View the original comment