nginx codeigniter 配置

WBOY
發布: 2016-07-28 08:27:52
原創
1030 人瀏覽過

nginx-1.10

codeigniter-3.0

1. nginx.conf

伺服器{        root D:/wnmp/www; 
        #charset koi8-r;
     位置/ {
#root D:/wnmp/www ;
            #index index.html index.htm;
                  #error_page  404             /404.html;
        # 將伺服器錯誤頁面重新導向至靜態頁面/50x.html
        #
           location = /50x.html {
            root   html;
        }
        # 將PHP 腳本傳遞至監聽127.0.0.1:9000            #root            D:/登錄>; #fastcgi_pass    127.0.0.1:9000;
            #fastcgi_index    index.php;
    ument_root$ fastcgi_script_name;
            #include                fastcgi_pass  127.0.0.1:9000;
            fastcgi_param SCRIPT_FILENAME D:/wnmp/www/index.php;      --   此處
            fastcgi_split_path_info ^(.+.php)(.*)$;             包含fastcgi.conf;          
2. index.php

解壓縮codeigniter,重新命名為ci,放在d:/wnmp下


把ci下的index.php移到網站根目錄d:/wnmp/ www下


index.php配置

$system_path = 'D:/wnmp/ci/system';

$application_folder = ' D:/wnmp/ ci/application';

$view_folder = '';

3. config.php


ci/application/config/config.php

$config['base_url'] = 'http://localhost/';

$config[ 'index_page'] = '';

$config['uri_protocol' ]    = 'REQUEST_URI';

重啟nginx,完成。

參考:

Nginx下設定codeigniter框架方法

以上就介紹了nginx codeigniter配置,包含了面向的內容,希望對PHP教學有興趣的朋友有幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!