E
E
Egor Tregubenko2016-04-23 17:55:38
PHP
Egor Tregubenko, 2016-04-23 17:55:38

Why is nginx 1.8.1 giving 403 error?

In general, the site gives a 403 error Failed to load resource: the server responded with a status of 403 (Forbidden)
In the nginxa logs, this is:

2016/03/24 18:53:39 [emerg] 2374#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/03/24 18:53:39 [emerg] 2374#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/03/24 18:53:39 [emerg] 2374#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/03/24 18:53:39 [emerg] 2374#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/03/24 18:53:39 [emerg] 2374#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/03/24 18:53:39 [emerg] 2374#0: still could not bind()

in the config /etc/nginx/nginx.conf the following code:
user  apache;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/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  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
  include /etc/nginx/vhosts/*/*.conf;
server {
        server_name localhost;
 disable_symlinks if_not_owner;
  include /etc/nginx/vhosts-includes/*.conf;
  location @fallback {
    error_log /dev/null crit;
    proxy_pass http://127.0.0.1:8080;
    proxy_redirect http://127.0.0.1:8080 /;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    access_log off ;
  }
  listen 80;
    }
}

It's strange, but the rest of the sites in the user work fine, at the root of the site itself there is only index.html with a direct script. I tried to change the rights, it does not help
. I manage the site under ispmanager
Where is the dog buried?
here are the latest bugs
2016/04/23 06:10:17 [error] 347#0: *27656 "/var/www/maxkondaurov/data/www/mkpr.ru/index.html" is forbidden (13: Permission denied), client: 31.47.112.83, server: mkpr.ru, request: "GET / HTTP/1.1", host: "mkpr.ru", referrer: "http://maxkondaurov.ru/"
2016/04/23 06:10:17 [error] 347#0: *27656 open() "/var/www/maxkondaurov/data/www/mkpr.ru/favicon.ico" failed (13: Permission denied), client: 31.47.112.83, server: mkpr.ru, request: "GET /favicon.ico HTTP/1.1", host: "mkpr.ru", referrer: "http://mkpr.ru/"
2016/04/23 06:30:16 [error] 347#0: *27681 open() "/var/www/maxkondaurov/data/www/mkpr.ru/bitrix/admin/index.php" failed (13: Permission denied), client: 94.180.109.24, server: mkpr.ru, request: "POST /bitrix/admin/index.php?login=yes HTTP/1.1", host: "mkpr.ru"
2016/04/23 06:30:16 [error] 347#0: *27681 open() "/var/www/maxkondaurov/data/www/mkpr.ru/bitrix/admin/index.php" failed (13: Permission denied), client: 94.180.109.24, server: mkpr.ru, request: "POST /bitrix/admin/index.php?login=yes HTTP/1.1", host: "mkpr.ru"
2016/04/23 08:37:52 [error] 347#0: *27905 open() "/var/www/maxkondaurov/data/www/mkpr.ru/robots.txt" failed (13: Permission denied), client: 157.55.39.70, server: mkpr.ru, request: "GET /robots.txt HTTP/1.1", host: "mkpr.ru"
2016/04/23 08:39:29 [error] 347#0: *27906 "/var/www/maxkondaurov/data/www/mkpr.ru/index.html" is forbidden (13: Permission denied), client: 157.55.39.70, server: mkpr.ru, request: "GET / HTTP/1.1", host: "mkpr.ru"
2016/04/23 08:46:45 [error] 347#0: *27918 "/var/www/maxkondaurov/data/www/mkpr.ru/index.html" is forbidden (13: Permission denied), client: 217.69.133.169, server: mkpr.ru, request: "GET / HTTP/1.1", host: "mkpr.ru"
2016/04/23 08:46:45 [error] 347#0: *27919 open() "/var/www/maxkondaurov/data/www/mkpr.ru/favicon.ico" failed (13: Permission denied), client: 217.69.133.169, server: mkpr.ru, request: "GET /favicon.ico HTTP/1.1", host: "mkpr.ru"
2016/04/23 10:22:33 [error] 347#0: *28208 open() "/var/www/maxkondaurov/data/www/mkpr.ru/bitrix/admin/index.php" failed (13: Permission denied), client: 94.180.109.24, server: mkpr.ru, request: "POST /bitrix/admin/index.php?login=yes HTTP/1.1", host: "mkpr.ru"
2016/04/23 10:22:33 [error] 347#0: *28208 open() "/var/www/maxkondaurov/data/www/mkpr.ru/bitrix/admin/index.php" failed (13: Permission denied), client: 94.180.109.24, server: mkpr.ru, request: "POST /bitrix/admin/index.php?login=yes HTTP/1.1", host: "mkpr.ru"
2016/04/23 10:28:08 [error] 347#0: *28226 "/var/www/maxkondaurov/data/www/mkpr.ru/index.html" is forbidden (13: Permission denied), client: 31.47.112.83, server: mkpr.ru, request: "GET / HTTP/1.1", host: "mkpr.ru"
2016/04/23 10:28:08 [error] 347#0: *28226 open() "/var/www/maxkondaurov/data/www/mkpr.ru/favicon.ico" failed (13: Permission denied), client: 31.47.112.83, server: mkpr.ru, request: "GET /favicon.ico HTTP/1.1", host: "mkpr.ru", referrer: "http://mkpr.ru/"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Tregubenko, 2016-04-24
@Sinecuraweb

In general, I decided by typing, in setting up the domain itself I poked different checkboxes now it worked) put ssl on the screen, enabled php and encoding
skrinshoter.ru/s/240416/D1Ngtx?a

A
alegzz, 2016-04-23
@alegzz

1 port can listen to 1 process.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question