LINUX.ORG.RU

Сообщения zloyyyyyy

 

Nignx Permission denied

Форум — Admin

Добрый день друзья!

Помогите победить проблему. Centos 7 установлен nginx

Сейчас я уже для тестов все сбросил на дефолт

Вот конфиг nginx

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    index   index.html index.htm;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        server_name  localhost;
        root         /usr/share/nginx/html;

        #charset koi8-r;

        #access_log  /var/log/nginx/host.access.log  main;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        }

        # redirect server error pages to the static page /40x.html
        #
        error_page  404              /404.html;
        location = /40x.html {
        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
        }
    }
}

Вот права на папку уже до абсурда 777

[root@c2-04-s14-01 nginx]# ls -ld /usr/share/nginx/html
drwxrwxrwx 2 nginx nginx 4096 Apr 29 08:54 /usr/share/nginx/html
[root@c2-04-s14-01 nginx]# ls -la /usr/share/nginx/html
total 28
drwxrwxrwx 2 nginx nginx 4096 Apr 29 08:54 .
drwxrwxrwx 3 root  root  4096 Apr  9 22:59 ..
-rwxrwxrwx 1 nginx nginx 3650 Apr  9 22:58 404.html
-rwxrwxrwx 1 nginx nginx 3693 Apr  9 22:58 50x.html
-rwxrwxrwx 1 nginx nginx 3700 Apr  9 22:58 index.html
-rwxrwxrwx 1 nginx nginx  370 Apr  9 22:58 nginx-logo.png
-rwxrwxrwx 1 nginx nginx 3034 Apr  9 22:58 poweredby.png
[root@c2-04-s14-01 nginx]#

SeLinux выключен

[root@c2-04-s14-01 nginx]# sestatus
SELinux status:                 disabled
[root@c2-04-s14-01 nginx]#

В логах Nginx

2015/04/29 09:12:41 [error] 13290#0: *1 "/usr/share/nginx/html/index.html" is forbidden (13: Permission denied), client: xx.xx.xx.xx, server: localhost, request: "GET / HTTP/1.1", host: "xx.xx.xx.xx"

2015/04/29 09:12:41 [error] 13290#0: *1 open() "/usr/share/nginx/html/favicon.ico" failed (13: Permission denied), client: xx.xx.xx.xx, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "xx.xx.xx.xx"

на сайте соответственно

403 Forbidden

Что ему еще то надо от меня? Подскажите советом. Спасибо.

 

zloyyyyyy
()

RSS подписка на новые темы