Re: Проблема с root
Alexander Petrovsky
askjuise на gmail.com
Чт Май 26 07:52:39 MSD 2011
>
> Конфиг:
>
> server
> {
> listen 80;
> server_name mydomain.com;
> access_log /var/log/nginx/mydomain.com.access.log;
>
> location / {
> root /var/www/mydomain.com;
> index index.php;
> try_files $uri /index.php?$query_string;
> }
>
> location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|htm|html|txt)$ {
> access_log off;
> expires 30d;
> root /var/www/mydomain.com;
> }
>
> location = /test/munin {
> #root /var/cache/munin/www;
> alias /var/cache/munin/www;
> index index.html;
> }
>
> location ~ .php$ {
> root /var/www/mydomain.com;
> fastcgi_split_path_info ^(.+\.php)(.*)$;
> fastcgi_pass backend;
> fastcgi_index index.php;
> fastcgi_param DOCUMENT_ROOT /var/www/mydomain.com;
> fastcgi_param SCRIPT_FILENAME
> /var/www/mydomain.com$fastcgi_script_name;
> include fastcgi_params;
>
> 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_intercept_errors on;
> fastcgi_ignore_client_abort off;
> fastcgi_connect_timeout 60;
> fastcgi_send_timeout 30;
> fastcgi_read_timeout 30;
> fastcgi_buffer_size 128k;
> fastcgi_buffers 4 245k;
> fastcgi_busy_buffers_size 256k;
> fastcgi_temp_file_write_size 256k;
> }
>
> location ~ /\.ht {
> deny all;
> }
> }
>
> upstream backend
> {
> server 127.0.0.1:9000;
> }
>
>
>
> Логи:
>
> 2011/05/26 01:07:29 [error] 872#0: *10 open()
> "/var/cache/munin/www/test/munin" failed (2: No such file or directory),
> client: xx.xx.xx.xx, server: mydomain.com, request: "GET /test/munin
> HTTP/1.1", host: "mydomain.com"
>
Абсолютно адекватное поведение nginx'а. В какой каталог вам необходимо
попасть при запросе /test/munin? В /var/cache/test/munin/index.html или в
/var/cache/munin/index.html?
--
Петровский Александр / Alexander Petrovsky,
Jabber: juise at jabber.ru
Phone: +7 914 8 820 815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20110526/327f963f/attachment.html>
Подробная информация о списке рассылки nginx-ru