/var/tmp/nginx and nginx -t

Igor Sysoev is at rambler-co.ru
Fri Dec 9 12:32:04 MSK 2005


On Fri, 9 Dec 2005, Vyacheslav Kokorin wrote:

> ОС FreeBSD 6, nginx версии 0.3.11 компилировался из портов.
> Проблема такая:
> если отсутствует /var/tmp/nginx, то nginx -t выдаёт ошибку:
> # nginx -t
> 2005/12/09 11:40:29 [info] 98043#0: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> 2005/12/09 11:40:29 [emerg] 98043#0: mkdir() "/var/tmp/nginx/client_body_temp" failed (2: No such file or directory)
> 2005/12/09 11:40:29 [emerg] 98043#0: the configuration file /usr/local/etc/nginx/nginx.conf test failed
>
> Вопрос: Можно ли директивами менять путь /var/tmp/nginx ?

Да:

    client_body_temp_path  /path;
    proxy_temp_path        /path;
    fastcgi_temp_path      /path;


> Конфиг nginx такой:
> # cat /usr/local/etc/nginx/nginx.conf
> user  www www;
> worker_processes  1;
> error_log  /var/log/nginx-error.log crit;
> pid        /var/run/nginx.pid;
> events {
>    connections 1024;
> }
> http {
>    include                     mime.types;
>    default_type                text/html;
>    sendfile                    on;
>    access_log  off;
>    large_client_header_buffers 32 16k;
>    client_header_buffer_size   2k;
>    client_header_timeout  10m;
>    client_body_timeout    60m;
>    ignore_invalid_headers off;
>
>    proxy_temp_path            /home/nginx_tmp;
>
>    server {
>      ... и т.д.
>    }
> }


Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list