Nginx config for Joomla & Codeigniter inside a sub directory Nginx config for Joomla & Codeigniter inside a sub directory codeigniter codeigniter

Nginx config for Joomla & Codeigniter inside a sub directory


As for CodeIgniter level setting, do edit application/config/config.php file (read comments in config.php as well)

$config['base_url'] = 'http://example.com/xml_apps';

If you want nice urls please apply code below as well

$config['index_page'] = '';

As for Nginx settings please visit Nginx community - it is all explained there very nicely.

Edit

do change nginx settings

# removes access to "system" folder, also allows a "System.php" controllerif ($request_uri ~* ^/system){    rewrite ^/(.*)$ /index.php?/$1 last;    break;}# unless the request is for a valid file (image, js, css, etc.), send to bootstrapif (!-e $request_filename){    rewrite ^/(.*)$ /index.php?/$1 last;    break;}


Nothing is wrong with the config file, and assuming that you are using the latest version of NGINX, I highly suggest that you look at your network map topology to see if their are 2 or more hops that may be causing the problem, because if there is a router that is behind the main router of your server then the HTTP protocol is dropped by the first router. In order to fix this problem, I suggest that you hop onto HYPER TERMINAL and use the ip route command for the first router, to route the ip domain of the host to the rotuer that is interfering with the connection.

Hopefully this solves your problem!


Try replacing your location /xml_apps/ block with this

location /xml_apps/ {    try_files $uri $uri/ /xml_apps/index.php?$args;}

And make sure your codeigniter base_url config is correct

$config['base_url'] = 'http://example.com/xml_apps';