How to solve the 404 error of Ci in nginx

Source: Internet
Author: User

Because your nginx configuration is to intercept access To the. php file suffix and forward to the PHP-CGI, and index. php and index. php/are different .. In nginx, you write the following statement:

If (! -E $ request_filename) {rewrite ^. * $/index. php last ;}
// Solve the problem,

 

Nginx does not support the path_info mode by default. You need to modify the nginx configuration so that nginx can parse the index. PHP/controller/F: # ciserver {Listen 80; SERVER_NAME www.ci.com; Index. PHP index.html index.htm; root "/servers/apps/CI"; location ~ \. PHP {fastcgi_pass 127.0.0.1: 9000; fastcgi_index index. PHP; ######################################## # pathinfo mode set $ path_info ""; set $ real_script_name $ fastcgi_script_name; if ($ fastcgi_script_name ~ "^ (. +? \. PHP )(/. +) $ ") {set $ real_script_name $1; set $ path_info $2;} include FastCGI. conf; fastcgi_param script_filename $ document_root $ real_script_name; fastcgi_param script_name $ real_script_name; fastcgi_param path_info $ path_info; ######################################## # key points of nginx support for pathinfo mode }}

 

How to solve the 404 error of Ci in nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.