Добрый день
Господа, подскажите плз, этот конфиг сильно кривой, или я двигаюсь в
правильном направлении?
server {
listen *:80;
server_name gametest.mydomain.com;
root /home/client/gametest.mydomain.com/htdocs;
index  index.php;

location /img {
    try_files $uri $uri @img_fallback;

}

location @img_fallback {
        fastcgi_pass 127.0.0.1:9001;
        fastcgi_index index.php;
        fastcgi_param   PHPRC "/home/client/php";
        fastcgi_param SCRIPT_FILENAME /home/client/
gametest.mydomain.com/htdocs/img/index.php;
        include fastcgi_params;
}

location /editor {
    try_files $uri $uri @editor_fallback;

}

location @editor_fallback {
        fastcgi_pass 127.0.0.1:9001;
        fastcgi_index index.php;
        fastcgi_param   PHPRC "/home/client/php";
        fastcgi_param SCRIPT_FILENAME /home/client/
gametest.mydomain.com/htdocs/editor/index.php;
        include fastcgi_params;
}


location /game {
    try_files $uri $uri @game_fallback;

}
location @game_fallback {
    rewrite /game/([0-9]+\.html)$ /game/index.php?id=$1;

        fastcgi_pass 127.0.0.1:9001;
        fastcgi_index index.php;
        fastcgi_param   PHPRC "/home/client/php";
        fastcgi_param SCRIPT_FILENAME /home/client/
gametest.mydomain.com/htdocs/game/index.php;
        include fastcgi_params;
}


location ~ .php$ {
        fastcgi_pass 127.0.0.1:9001;
        fastcgi_index index.php;
        fastcgi_param   PHPRC "/home/client/php";
        fastcgi_param SCRIPT_FILENAME /home/client/
gametest.mydomain.com/htdocs$fastcgi_script_name;
        include fastcgi_params;
}

error_log /home/client/logs/gametest.mydomain.com-error.log;
access_log /home/client/logs/gametest.mydomain.com-access.log;

}
_______________________________________________
nginx-ru mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить