Configure Nginx for CodeIgniter

Diposting pada

To my knowledge we need to add this code to the Nginx virtual host configuration:

location / {
                try_files $uri $uri/ /index.php;
        }

Make sure that the CI configuration is also appropriate:

nano /system/application/config/config.php

Adapt it:

$ config ['base_url'] = "http://name_domain.com/";
$ config ['index_page'] = "";
$ config ['uri_protocol'] = "REQUEST_URI";

After that restart Nginx.

Acep Sopian
Founder dari codeitworld.com, Pekerjaan sebagai Analyst yang senang ngulik masalah server, coding adalah bagian pekerjaan sehari-hari. Hobi Gowes Sepeda dan Running.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

This site uses Akismet to reduce spam. Learn how your comment data is processed.