Welcome! Log In Create A New Profile

Advanced

Re: проблема с каталогами

February 15, 2011 03:18AM
On Tue, Feb 15, 2011 at 03:05:55AM -0500, smack87 wrote:
> Привет, есть такой конфиг
> [code]
> worker_processes 1;
>
> events {
> worker_connections 1024;
> }
>
>
> http {
> include mime.types;
> default_type application/octet-stream;
>
> sendfile on;
> keepalive_timeout 65;
>
> proxy_buffers 8 32k;
> proxy_buffer_size 64k;
>
>
>
>
> server {
> listen 127.0.0.77;
>
> server_name yii-loc.com;
> charset utf-8;
>
> root "f:/Dropbox/web/yii-loc.com";
>
> location / {
> try_files $uri @php;
> }
>
> location @php {
> fastcgi_pass 127.0.0.1:9123;
> fastcgi_param SCRIPT_FILENAME $document_root/index.php;
> fastcgi_param QUERY_STRING $uri;
> include fastcgi_params1;
> }
> }
> [/code]

> Как сделать, чтобы когда я захожу в
> yii-loc.com/requrements или любую другую папку,
> чтобы оно искало там index.php и запускало
> его на выполнение?
> В настройке nginx очень мало понимаю,
> посоветуйте что можно почитать чтобы
> лучше разобраться. В документации
> ничего не понятно.

location / {
try_files $uri $uri/ @php;
index index.php;
}

location @php {
fastcgi_pass 127.0.0.1:9123;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param QUERY_STRING $uri;
include fastcgi_params1;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9123;
fastcgi_param SCRIPT_FILENAME $document_root/$uri;
fastcgi_param QUERY_STRING $args;
include fastcgi_params1;
}


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

проблема с каталогами

smack87 February 15, 2011 03:05AM

Re: проблема с каталогами

Igor Sysoev February 15, 2011 03:18AM

Re: проблема с каталогами

smack87 February 15, 2011 03:36AM

Re: проблема с каталогами

smack87 February 15, 2011 03:45AM

Re: проблема с каталогами

Igor Sysoev February 15, 2011 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 126
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