Welcome! Log In Create A New Profile

Advanced

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

greenh
February 18, 2014 07:14AM
Добрый день
Господа, подскажите плз, этот конфиг сильно кривой, или я двигаюсь в
правильном направлении?
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
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

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

greenh February 18, 2014 07:14AM

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

Anton Yuzhaninov February 18, 2014 08:12AM

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

greenh February 18, 2014 08:32AM

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

Алексей Сундуков February 19, 2014 06:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready