пятница, 25 октября 2013 г.

Конфиг nginx для moodle 2.5

Выкладываю мой конфиг nginx для moodle 2.5:
server {
        listen   80;
        root /path/www;
        server_name domain_name.zone;
        access_log  /path/nginx.access.log;                                                                                
                                                                                                                                                                     
        error_page 404 /404.php;
        error_page 405 /post_error.php;
        error_page 403 500 /500.php;


        client_max_body_size 900m;
 location / {
                index index.php index.html index.htm;
        }
location  ~ ^(.+\.php)(.*)$ {                                                                                                                                                               
  include fastcgi_params;                                                                                                           
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
                                                                                                                                           
                          
                                                                                                                     

 rewrite ^(.*)/(.*\.php)(/)(.*)$ /$1/$2?file=/$4 last;
 fastcgi_param  QUERY_STRING       $query_string;
 fastcgi_param  REQUEST_METHOD     $request_method;
 fastcgi_param  CONTENT_TYPE       $content_type;
 fastcgi_param  CONTENT_LENGTH     $content_length;


 fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
 fastcgi_param  SCRIPT_FILENAME    $fastcgi_script_name;
 fastcgi_param  REQUEST_URI        $request_uri;
 fastcgi_param  DOCUMENT_URI       $document_uri;
 fastcgi_param  DOCUMENT_ROOT      $document_root;
 fastcgi_param  SERVER_PROTOCOL    $server_protocol;

 fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
 fastcgi_param  SERVER_SOFTWARE    nginx;
 fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name$fastcgi_path_info;
                                                                                                                                                            
 fastcgi_param  REMOTE_ADDR        $remote_addr;
 fastcgi_param  REMOTE_PORT        $remote_port;
 fastcgi_param  SERVER_ADDR        $server_addr;
 fastcgi_param  SERVER_PORT        $server_port;
 fastcgi_param  SERVER_NAME        $server_name;

 fastcgi_pass   127.0.0.1:9000;                                             
 fastcgi_index  index.php;
 }


Комментариев нет:

Отправить комментарий