Покритикуйте конфиг

greenh greenh at gmail.com
Tue Feb 18 12:12:10 UTC 2014


Добрый день
Господа, подскажите плз, этот конфиг сильно кривой, или я двигаюсь в
правильном направлении?
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;

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20140218/44f992b9/attachment.html>


Подробная информация о списке рассылки nginx-ru