nginx 코드이그나이터 구성

WBOY
풀어 주다: 2016-07-28 08:27:52
원래의
1030명이 탐색했습니다.

nginx-1.10

codeigniter-3.0

1. nginx.conf

서버 {
        듣기       80;
        server_name  localhost;  <---------여기
        루트 D:/wnmp/www;  <------- 여기
        #charset koi8-r;
        #access_log logs/host.access.log  main;
        위치 / {
            #root D:/wnmp/www ;
            #index index.html index.htm;
             try_files $uri $uri/ /index.php;   <------- 여기
        }
        #error_page  404             /404.html;
        # 서버 오류 페이지를 정적 페이지로 리디렉션 /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # 127.0.0.1:9000        #
        위치 ~ .php$ {            
            #root            D:/wnmp/www;
            #fastcgi_pass    127.0.0.1:9000;
            #fastcgi_index    index.php;
            #fastcgi_param    SCRIPT_FILENAME $document_root$ fastcgi_script_name;
            #include            fastcgi_params;
            
            fastcgi_pass  127.0.0.1:9000;
           fastcgi_param SCRIPT_FILENAME D:/wnmp/www/index.php;   <-------------   여기
            fastcgi_param PATH_INFO $fastcgi_path_info;   <-------------   여기
            fastcgi_split_path_info ^(.+.php)(.*)$;  <-------------   여기
            fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;  <-------------   여기
            include  fastcgi.conf;   <-------------   여기
        }
    }

2. index.php

解压codeigniter, 重命name为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 학습자의 빠른 성장을 도와주세요!