Configuring multiple Codeigniter on one server

by arash bahrami   Last Updated October 05, 2018 09:05 AM

I've to install 2 seperate codeigniter application on one server , one in root, which works perfectly, and one in sub-folder (socialnet) on root, which I can access just to default controller as I set on CI config.php, but when I want to access to other controller on the second CI, the requested page redirected to first CI's 404 page. I try to configure nginx.conf but still cant fix this.

my nginx.conf is: ... location /socialnet { alias /usr/share/nginx/html/socialnet; try_files $uri $uri/ /socialnet/index.php$args; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/socialnet/index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index   index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param   SCRIPT_FILENAME $request_filename;


Related Questions

Create dynamic sub domain

Updated July 16, 2015 14:02 PM

Redirecting dynamic slugs stored in database

Updated August 01, 2016 08:02 AM

How to make a label act as a button

Updated March 03, 2016 01:02 AM