CI 묻고 답하기

제목 nginx를 사용해서 codeigniter 연동 질문
글쓴이 택배왔뜨아 작성시각 2015/03/10 11:43:42
댓글 : 3 추천 : 0 스크랩 : 0 조회수 : 17684   RSS
현재 nginx를 통해서 php까지만 연동이 된 상태입니다.
즉. phpinfo 찍으면 잘뜨는데요..

그래서 생활코딩 따라서
codeigniter연동을 해보려고하는데요..

생활코딩에서는 codeigniter파일만 html파일에 풀어놓으면은 잘되던데요..
그게아닌가보네요;;
구글링 하다가 도저히 안되서 질문 올립니다.
localhost/index.php를 찍거나
localhost/index.php/welcome를 찍으면은
404에러가 나오네요
localhost를 찍으면 nginx가 찍히고요

현재 nginx 파일은 다음과 같습니다.
개발 환경은 윈도우7을 사용하고있습니다.

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm index.php;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  C:\nginx\nginx\html/$fastcgi_script_name;
            include        fastcgi_params;
        include        fastcgi.conf;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
답변주시면 감사하겠습니다~
 다음글 이 내용과 같이 오라클 프로시져 사용하는 방법을 알려주... (1)
 이전글 restful api를 통해 개발하고 있습니다.. (12)

댓글

ci세상 / 2015/03/10 12:38:53 / 추천 0
골때마추기 / 2015/03/10 14:14:09 / 추천 0
@ci세상 전 윈도우입니다.. 윈도우에서 설정하는 방법은 없는거같군요..ㅠ
ci세상 / 2015/03/11 10:56:31 / 추천 0
전 윈도우8.1에서 테스트 했는데 다음 문서 참고함 해보세요
http://cikorea.net/tip/view/1823/page/1