@wexvellencex

Ошибка в Nginx, в чем проблема?

Добрый день, Делаю почтовый сервер, делаю по этой инструкции https://www.dmosk.ru/instruktions.php?object=mails..., но делаю на Rocky 9, но на этапе когда надо войти в http://IP-адрес сервера/postfixadmin/public/setup.php Мне выдается ошибка:
nginx error!

The page you are looking for is temporarily unavailable. Please try again later.

Something has triggered missing webpage on your website. This is the default error page for nginx that is distributed with Rocky Linux. It is located /usr/share/nginx/html/50x.html

You should customize this error page for your own site or edit the error_page directive in the nginx configuration file /etc/nginx/nginx.conf.

For information on Rocky Linux, please visit the Rocky Linux website. The documentation for Rocky Linux is available on the Rocky Linux website."

В чем может проблема понять особо не могу, логи смотрел, они ругаются только, что нет изображений, а других ошибок нет

Конфиг Nginx'a

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    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;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 4096;

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

    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80;
        server_name  _;
        root         /usr/share/nginx/html;

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

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }

        location ~ \.php$ {
            set $root_path /usr/share/nginx/html;
            fastcgi_pass unix:/run/php-fpm/www.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME "$root_path$fastcgi_script_name";
            include fastcgi_params;
            fastcgi_param DOCUMENT_ROOT "$root_path";
        }
    }

Гуглил и переводил, не помогло, в чем может быть проблема?
  • Вопрос задан
  • 212 просмотров
Пригласить эксперта
Ответы на вопрос 2
Alex_Geer
@Alex_Geer
System Engineer
Что то у тебя конфиг nginx вообще не похож на то что ты пытаешься сделать )
У тебя ошибка показывает что отсутствует страница по адресу /usr/share/nginx/html/50x.html
Удали лучше дефолтный конфиг и сделай свой как описывается в гайде.
Ответ написан
888AndeR888
@888AndeR888
IT специалист
Просмотрел инструкцию, там права на папку postfixadmin даются пользователю apache, а nginx у вас стартует от пользователя nginx. Чисто для проверки теории попробуйте "user nginx;" изменить на "user apache;" и перезапустить nginx.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы