Welcome! Log In Create A New Profile

Advanced

Re: Ошибка "No such file or directory"

Alexey V. Karagodov
November 30, 2010 06:02PM
http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#try_files

On 01.12.2010, at 1:49, Lord_of_fear wrote:

> Доброго времени суток.
> Настроил связку apache+nginx. На vps хостятся
> Drupal и WordPress.
> На обоих хостах имею в логе кучу ошибок
> вида:
> [b]2010/11/30 00:36:51 [error] 36315#0: *41773 open()
> "/var/www/mysite1/folder/1/0.jpg" failed (2: No such file or directory)
> 2010/11/30 00:36:51 [error] 36315#0: *41773 open()
> "/var/www/mysite2/folder1/2/2.png" failed (2: No such file or
> directory)[/b]
> И так по всем статическим файлам,
> которые должен отдавать NginX. Но весь
> контент юзеру отдаётся корректно.
> Файлы по всем путям существую и
> пермишены на них выставлены корректно.
> Прочитать файл, открыть директорию
> имеет право любой пользователь.
> [u]Подскажите, пожалуйста, что мне
> сделать?[/u]
> Привожу конфиг nginx:
> [code]
> user www-data;
> worker_processes 5;
>
> error_log /var/log/nginx/error.log;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 1024;
> }
>
> http {
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
> access_log off;
> server_names_hash_bucket_size 64;
>
> sendfile on;
>
> keepalive_timeout 65;
> tcp_nodelay on;
>
> gzip on;
> gzip_min_length 1024;
> gzip_types text/html text/xml text/css application/x-javascript
> text/javascript;
> include /etc/nginx/conf.d/*.conf;
> include /etc/nginx/sites-enabled/*;
> }
> [/code]
>
> Конфиг одного из хостов. На втором всё
> аналогично:
>
> [code]
> server {
> # какой порт слушать
> listen 80;
> server_name mysite1.ru www.mysite1.ru;
> location / {
> proxy_pass http://127.0.0.1:81/;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
> location ~*
> \.(gif|jpg|jpeg|png|ico|css|swf|js|html|htm|xml|txt|gz|bmp|xls)$ {
> root /var/www/mysite1;
> }
> }
> [/code]
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,154578,154578#msg-154578
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru


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

Ошибка "No such file or directory"

Lord_of_fear November 30, 2010 05:49PM

Re: Ошибка "No such file or directory"

Alexey V. Karagodov November 30, 2010 06:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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