nginx 404 error after installing iRedMail on same droplet

Discussion in 'Nginx' started by lew1s666, Feb 21, 2015.

  1. #1
    I am using VPN with digital ocean and everything works fine untill i installed iRedMail.

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

    my block for this domain is :

    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 soc$
    location ~ .php$ {
    tryfiles $uri =404;
    fastcgi
    pass unix:/var/run/php5-fpm.sock;
    fastcgiindex index.php;
    fastcgi
    param SCRIPTFILENAME $documentroot$fastcgiscriptn$
    include fastcgi_params;

    }

    }
     
    lew1s666, Feb 21, 2015 IP