네, 변종원(웅파) 님.
물론 안되는 것 확인하고 했죠. 여러가지로 설정이 안맞는 것들이 많아서 질문 올리고 계속 시도 하다보니 되더라구요. 물론 한 3일전까지 하다가 안되서 글을 올린거긴 하지만 질문 올리고 가만히 있을 수 없어서 하다보니 되더군요. 근데 설정이 조금 이상해서 이것만 좀 봐주 시겠어요?
nginx.conf 설정 (windows)
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;
# 예외 디렉토리 /js, /img, /css
if ($request_uri ~* ^/js)
{
rewrite ^/todo/include/js/(.*)$ /js/$1 last;
break;
}
if ($request_uri ~* ^/css)
{
rewrite ^/todo/include/js/(.*)$ /css/$1 last;
break;
}
if ($request_uri ~* ^/img)
{
rewrite ^/todo/include/img/(.*)$ /img/$1 last;
break;
}
#todo application
if ($request_uri ~* ^/todo)
{
rewrite ^/(.*)$ /todo/index.php?/$1 last;
break;
}
# remove access to system folder, also allows a 'System.php' controller
if ($request_uri ~* ^/system)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
}
#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;
try_files $uri $uri/ /index.php;
}
# 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:\MTB_Setup\Server\nginx-1.9.2\html$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;
#}
}
...