TIP게시판

제목 nginx rewrite 모드
글쓴이 테러보이 작성시각 2015/03/05 13:09:06
댓글 : 11 추천 : 0 스크랩 : 1 조회수 : 21627   RSS
테러보이
다음과 같이 설정하면 작동되네요.

#
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.php index.html index.htm index.nginx-debian.html;

    server_name localhost;

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

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;

        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny all;
    }
}
 다음글 PHP 패키지 관리 Composer 한글 메뉴얼 (3)
 이전글 T-SQL Base64 Encoding, Decodin... (1)

댓글

한대승(불의회상) / 2015/03/05 13:21:13 / 추천 0
유용한 정보 감사 합니다. ^^
테러보이 / 2015/03/05 13:23:48 / 추천 0
@한대승(불의화상) 님께서는 이미 알고 계실텐데요 ㅎㅎㅎ

http://cikorea.net/qna/view/16122/page/1 이글에 도움이 되시지 않을까 해서 올려봅니다 ㅎㅎ
변종원(웅파) / 2015/03/05 13:44:17 / 추천 0
yes
한대승(불의회상) / 2015/03/05 14:13:46 / 추천 0
도움을 주기 위해 올려주시니 더욱 멋집니다. ^^
골때마추기 / 2015/03/10 11:34:30 / 추천 0
windows에서도 이렇게하면 되나요!?
위에는 리눅스 버전같은데..
테러보이 / 2015/03/10 11:35:48 / 추천 0
@골때마추기
제가 윈도우를 안써서 ㅠ.ㅠ....
골때마추기 / 2015/03/10 14:08:13 / 추천 0
localhost/index.php/welcome 하면 welcome 화면이 떠야 잘 설치가 된거지요!?
골때마추기 / 2015/03/10 14:08:20 / 추천 0
localhost/index.php/welcome 하면 welcome 화면이 떠야 잘 설치가 된거지요!?
테러보이 / 2015/03/10 14:13:05 / 추천 0
@골때마추기
넵~!
localhost/welcome
이렇게 하셔도될거에요 ㅎㅎ

 
골때마추기 / 2015/03/10 15:38:28 / 추천 0
@테러보이 404만 뜨네요..ㅠㅠ
이 참에 리눅스로 갈아타야하나요;;;쩝...;;
윈도우환경에서는 찾아도없네요..ㅠ
테러보이 / 2015/03/10 17:24:41 / 추천 0
@골때마추기
윈도우 apm or npm도 설정 방법은 같을것으로 생각 됩니다.^^