I have setup my nginx conf following this link for my codeigniter server block https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/ with some addition like this
server {
listen 80;
server_name domain.com;
autoindex on;
root /var/www/server;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
location = /index.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME /var/www/server$fastcgi_script_name;
include fastcgi_params;
}
}
location ~ \.php$ {
return 444;
}
location ~* ^/(assets|files|robots\.txt) { }
location ~ /\.ht {
deny all;
}
}
But turns out still routed to error_404 default by CI. Anybody could enlighten me? Thanks
it's resolved, no need for nginx conf. Merely from small mistakes with filename
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.