Configure Nginx for CodeIgniter

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.

Pos terkait

Tinggalkan Balasan

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

Situs ini menggunakan Akismet untuk mengurangi spam. Pelajari bagaimana data komentar Anda diproses.