nginx 404 error after installing iRedMail on same droplet

February 21, 2015 527 views

so i installed iRedMail on my droplet with nginx. now my nginx server is showing 404 not found. i tried to troubleshoot and now i ma stuck. really dont know where is the bug.

Apache is shut down. only nginx is running.
something is still pointing for every my domain to /var/www/html/index.php

my main nginx folder for all websites si /var/www/

I dont understand how can point to index.php

my nginx error log :

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:, server: _, request: "GET / HTTP/1.1", host: ""

my block for this domain is :

server {
listen 80;

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


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 soc$

location ~ .php$ {
tryfiles $uri =404;
pass unix:/var/run/php5-fpm.sock;
fastcgiindex index.php;
param SCRIPTFILENAME $documentroot$fastcgiscriptn$
include fastcgi_params;



Be the first one to answer this question.