![]() |
Battling Codeigniter to work with Nginx for 3 days - Need urgent help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Battling Codeigniter to work with Nginx for 3 days - Need urgent help! (/showthread.php?tid=53586) |
Battling Codeigniter to work with Nginx for 3 days - Need urgent help! - El Forum - 07-30-2012 [eluser]Unknown[/eluser] Hello everyone. As I'm trying to make my switch from Apache 2 to Nginx, I faced dozens of problems, and still fixing them. anyway, I'm trying to make them work, but no-luck yet. So I'm asking here looking for help/previous experience. I used the default configurations to run PHP, and it works great when running PHP files only. but unfortunately codeigniter URL's doesn't end in *.PHP(as everybody knows). So, Is there any possible way to make them work togather? it seems impossible to me, I tried lots of configurations(after modifying them to fit my environment, ofcource) but non of them worked with Codeigniter. Hopefully posting my current configurations that works with normal php files, will lead to some solutions. Code: server { I also reconfigured config.php files like the following: Code: $config['base_url'] = "http://localhost/"; I tried these configurations and lots of others, usually the same results. Anyway, there are few points that will(hopefully) get me an answer: 1.I tried these configurations on Debian 6/Ubuntu 12.04 2.I'm running the latest php5-fpm , nginx from apt-get. 3.Something I notice, commenting out SCRIPT_NAME and SCRIPT_FILENAME(in fastcgi_params file) causes codeigniter to show an error. however commenting these on the current configuration above doesn't have any impact. 4.File permissions for all files under /usr/share is 777, I know it's insecure, but I'm using it for testing only. |