Welcome Guest, Not a member yet? Register   Sign In
can i use codeigniter with nginx?
#8

hey there
might be an overdue answer , thou this Que. has been bugging me for a day
best link to check out is https://gist.github.com/yidas/30a6114499...7951e5f17f

my config
first thing is first dont forget to backup ur config + change .htaccess file like
RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

on CodeIgniter side application/config/config.php
$config['base_url'] = '';
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'REQUEST_URI';

on Nginx side
server_name domainname.ts;
server_name 192.168.0.7; // local ip address
listen 127.0.0.1:80;
listen *:80;
location ~* \.php$ {
fastcgi_pass php_farm;
include nginx.fastcgi.conf;
}

location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri $uri/ /index.php;
}

# Deny for accessing .htaccess files for Nginx
location ~ /\.ht {
deny all;
}
#hope this works for future request,
Reply


Messages In This Thread
can i use codeigniter with nginx? - by agriz - 11-11-2014, 01:34 AM
RE: can i use codeigniter with nginx? - by Rufnex - 11-11-2014, 04:31 AM
RE: can i use codeigniter with nginx? - by abeni_ab - 09-29-2020, 08:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB