Joke Collection Website - Blessing messages - How to make nginx support the ci framework of php?
How to make nginx support the ci framework of php?
1. Modify the configuration file of ci framework.
Modify the value of $ config【‘uri _ protocol‘'].
Replace with:
$ config【‘uri _ protocol‘】? =? PATH _ INFO‘;
2. Modify the nginx configuration file and add the following code in the server section:
Location? /index.php{
fastcgi _ pass UNIX:/tmp/PHP-CGI . sock;
fastcgi_param? Script _ file name? /home/wwwroot/index . PHP;
fastcgi_param? Path information? $ fastcgi _ path _ info
fastcgi_split_path_info? ^(.+\.php)(。 *)$;
fastcgi_param? Path _ translated? $ document _ root $ fastcgi _ path _ info;
Including? fcgi.conf
}
If there are multiple applications (such as background applications), you can add multiple pieces of code and modify the corresponding entry files:
Location? /admin.php{
fastcgi _ pass UNIX:/tmp/PHP-CGI . sock;
fastcgi_param? Script _ file name? /home/wwwroot/admin . PHP;
fastcgi_param? Path information? $ fastcgi _ path _ info
fastcgi_split_path_info? ^(.+\.php)(。 *)$;
fastcgi_param? Path _ translated? $ document _ root $ fastcgi _ path _ info;
Including? fcgi.conf
}
- Related articles
- Huawei y5 1 1 How do we know if the other party has received the message?
- I wish the teacher a happy summer vacation.
- What should I do if I can't get the SMS verification code when I repay JD.COM's debt?
- What if Huawei's mobile phone can't send text messages?
- My girlfriend has gone back to her hometown. What can I say to warm her heart?
- When will China Construction Bank Shandong Branch issue the admission notice?
- Heihe driving school, which card is faster?
- How do enterprises of Agricultural Bank of China manage to send SMS numbers?
- How to check the cancelled flights in Russia?
- Short Mid-Autumn Festival and National Day greetings to elders