I've setup ubuntu, php5.6, nGinx on a server and I've deployed few projects under my website configured. One project I need to deploy under a directory is developed in codeigniter and I've configured the nGinx configuration as follows:
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
fastcgi_pass unix:/run/php/php5.6-fpm.sock;
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
The URL don't say 404 now but it is showing the home page of my site after URL rewrite. How can I fix this?