Skip to content

WEB-Сервер-КС6.0.9 отключение https (Nginx)

Задача

Отключить https (nginx) в контейнере wsks-6.0.9_443, и сменить порт 443 на 80.

1. Откройте файл конфигурации nginx_server.conf

bash
cp /opt/wsks-6.0.9_443/conf.ks/nginx_server.conf /opt/wsks-6.0.9_443/conf.ks/nginx_server.old
nano /opt/wsks-6.0.9_443/conf.ks/nginx_server.conf

2. Замените содержимое файла

nginx_server.conf
server {
    server_name  localhost;
    #access_log  /var/log/nginx/host.access.log  main;
    listen 443 http2 ssl default;
    listen 80;
    include /etc/nginx/conf.ks/vhost.ks/*.conf;   
    #location / {
    #    root   /var/www/html;
    #    index  index.html index.htm;
    #}
    location / {
        root   /var/www/html;
        index  index.html index.htm;
    }
    #error_page  404              /404.html;
    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

2. Настройте firewall

bash
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --reload

3. Перезапустите web-сервер и прочитайте статус

bash
systemctl restart wsks-6.0.9_443
systemctl status wsks-6.0.9_443

© 2003—2025 ООО «Кейсистемс». Все права защищены.