# installer" failed (20: Not a directory) - nginx+php7-fpm

**URL:** <https://forum.mautic.org/t/installer-failed-20-not-a-directory-nginx-php7-fpm/9412>\
**Category:** Product Support\
**Created:** [September 10, 2017, 5:06am UTC](https://forum.mautic.org/t/installer-failed-20-not-a-directory-nginx-php7-fpm/9412 "2017-09-10T05:06:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimas](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dimas](https://forum.mautic.org/u/dimas)\
**Post date:** [September 10, 2017, 5:06am UTC](https://forum.mautic.org/t/installer-failed-20-not-a-directory-nginx-php7-fpm/9412/1 "2017-09-10T05:06:21Z")

</div>

Im having hard time to install mautic on centos vps with nginx+php7-fpm. Thank you for your help.  
  
  
  
error im getting in browser:  
  
[http://XXX.com/index.php/installer](http://XXX.com/index.php/installer)  
  
404 Not Found nginx/1.12.1  
  
  
  
nginx error log:  
  
2017/09/09 23:02:27 [error] 5546#5546: \*655 openat() “/var/www/XXXX/data/www/XXXX.com/index.php/installer” failed (20: Not a directory), client: 47.155.18.15, server: [XXX.com](http://XXX.com), request: “GET /index.php/installer HTTP/1.1”, host: “[XXXX.com](http://XXXX.com)”  
  
  
  
Config

Code:

server { # see: http://wiki.nginx.org/Pitfalls # see: http://wiki.nginx.org/IfIsEvil listen 80; server\_name XXX.com www.XXX.com;

```
root /var/www/kedaranatha/data/www/xxxx.com;
index index.html index.htm index.php;
error_page 404 /index.php;

access_log /var/www/httpd-logs/XXX.com.access.log;
error_log /var/www/httpd-logs/XXX.com.error.log error;

charset utf-8;

# redirect index.php to root
rewrite ^/index.php/(.*) /$1 permanent;

#######################################
## Start Mautic Specific config #####
#######################################

# redirect some entire folders
rewrite ^/(vendor|translations|build)/.* /index.php break;

location / {
	# First attempt to serve request as file, then
	# as directory, then fall back to index.html
             try_files $uri $uri/ /index.php?$args;
	# Uncomment to enable naxsi on this location
	# include /etc/nginx/naxsi.rules
}

# Deny everything else in /app folder except Assets folder in bundles
location ~ /app/bundles/.*/Assets/ {
    allow all;
    access_log off;
}
location ~ /app/ { deny all; }

# Deny everything else in /addons or /plugins folder except Assets folder in bundles
location ~ /(addons|plugins)/.*/Assets/ {
    allow all;
    access_log off;
}
location ~ /(addons|plugins)/ { deny all; }

# Deny all php files in themes folder
location ~* ^/themes/(.*).php {
    deny all;
}

# Don't log favicon
location = /favicon.ico {
	log_not_found off;
	access_log off;
}

# Don't log robots
location = /robots.txt {
	access_log off;
	log_not_found off;
}

# Deny yml, twig, markdown, init file access
location ~* /(.*).(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
    deny all;
    access_log off;
    log_not_found off;
}

# Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...
location ~ /. {
    deny all;
    access_log off;
    log_not_found off;
}

# Deny all grunt, composer files
location ~* (Gruntfile|package|composer).(js|json)$ {
    deny all;
    access_log off;
    log_not_found off;
}

#######################################
## End Mautic Specific config #####
#######################################

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
    # try_files $uri =403;
    fastcgi_split_path_info ^(.+.php)(/.+)$;
    # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
    
    fastcgi_pass unix:/var/www/php-fpm/kedaranatha.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 16k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
}

```

}

---

<div class="post-metadata">

**Author:** ![dimas](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@dimas](https://forum.mautic.org/u/dimas)\
**Post date:** [September 10, 2017, 5:06am UTC](https://forum.mautic.org/t/installer-failed-20-not-a-directory-nginx-php7-fpm/9412/2 "2017-09-10T05:06:21Z")

</div>

Im having hard time to install mautic on centos vps with nginx+php7-fpm. Thank you for your help.

error im getting in browser:  
[http://XXX.com/index.php/installer](http://XXX.com/index.php/installer)  
404 Not Found nginx/1.12.1

nginx error log:  
2017/09/09 23:02:27 [error] 5546#5546: \*655 openat() “/var/www/XXXX/data/www/XXXX.com/index.php/installer” failed (20: Not a directory), client: 47.155.18.15, server: [XXX.com](http://XXX.com), request: “GET /index.php/installer HTTP/1.1”, host: “[XXXX.com](http://XXXX.com)”

Config

```auto
server {
    # see: http://wiki.nginx.org/Pitfalls
    # see: http://wiki.nginx.org/IfIsEvil
    listen 80;
    server_name XXX.com www.XXX.com;

    root /var/www/kedaranatha/data/www/xxxx.com;
    index index.html index.htm index.php;
    error_page 404 /index.php;

    access_log /var/www/httpd-logs/XXX.com.access.log;
    error_log /var/www/httpd-logs/XXX.com.error.log error;

    charset utf-8;

    # redirect index.php to root
    rewrite ^/index.php/(.*) /$1 permanent;

    #######################################
    ## Start Mautic Specific config #####
    #######################################

    # redirect some entire folders
    rewrite ^/(vendor|translations|build)/.* /index.php break;

    location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to index.html
                 try_files $uri $uri/ /index.php?$args;
 		# Uncomment to enable naxsi on this location
		# include /etc/nginx/naxsi.rules
	}

    # Deny everything else in /app folder except Assets folder in bundles
    location ~ /app/bundles/.*/Assets/ {
        allow all;
        access_log off;
    }
    location ~ /app/ { deny all; }

    # Deny everything else in /addons or /plugins folder except Assets folder in bundles
    location ~ /(addons|plugins)/.*/Assets/ {
        allow all;
        access_log off;
    }
    location ~ /(addons|plugins)/ { deny all; }

    # Deny all php files in themes folder
    location ~* ^/themes/(.*).php {
        deny all;
    }

    # Don't log favicon
    location = /favicon.ico {
    	log_not_found off;
    	access_log off;
    }

    # Don't log robots
    location = /robots.txt {
    	access_log off;
    	log_not_found off;
    }

    # Deny yml, twig, markdown, init file access
    location ~* /(.*).(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
        deny all;
        access_log off;
        log_not_found off;
    }

    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...
    location ~ /. {
        deny all;
        access_log off;
        log_not_found off;
    }

    # Deny all grunt, composer files
    location ~* (Gruntfile|package|composer).(js|json)$ {
        deny all;
        access_log off;
        log_not_found off;
    }

    #######################################
    ## End Mautic Specific config #####
    #######################################

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
	#
    location ~ .php$ {
        # try_files $uri =403;
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        
        fastcgi_pass unix:/var/www/php-fpm/kedaranatha.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        
        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 16k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
    }
}

```
