wildfly за nginx, сервлеты развернуты нормально, но недоступны

#nginx #servlets #configuration #wildfly

Вопрос:

Я установил wildfly 24 и nginx. Я настроил все в соответствии с https://www.howtoforge.com/tutorial/ubuntu-wildfly-jboss-installation/

Моя консоль wildfly работает, nginx активен и запущен. вот мой nginx.conf:

 user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

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

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}
 

единственный файл в conf.d-это proxyheaders.conf:
который содержит следующее

 proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Front-End-Https on;
add_header Cache-Control no-cache;
 

а вот содержимое моей конференции wildfly в каталоге с поддержкой сайтов

 server {
  listen          80;
  server_name     <My server ip address>;

location / {
    include conf.d/proxy_headers.conf;
    proxy_pass http://127.0.0.1:8080;
}

location /management {
    include conf.d/proxy_headers.conf;
    proxy_pass http://127.0.0.1:9990/management;
 

}

 location /console {
    include conf.d/proxy_headers.conf;
    proxy_pass http://127.0.0.1:9990/console;
}

location /logout {
include conf.d/proxy_headers.conf;
proxy_pass http://127.0.0.1:9990/logout;
 

}

 location /error {
   include conf.d/proxy_headers.conf;
   proxy_pass http://127.0.0.1:9990;
   }

}
 

the default conf file in sites-available directory contains the following:

 server {
    listen 80;
    server_name <my server url address in the format of example.com>;
    ssl off;
    # SSL configuration
    #
    # listen 443 ssl default_server;
    # listen [::]:443 ssl default_server;
    #
    # Note: You should disable gzip for SSL traffic.
    # See: https://bugs.debian.org/773332
    #
    # Read up on ssl_ciphers to ensure a secure configuration.
    # See: https://bugs.debian.org/765782
    #
    # Self signed certs generated by the ssl-cert package
    # Don't use them in a production server!
    #
    # include snippets/snakeoil.conf;

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ .php$ {
    #       include snippets/fastcgi-php.conf;
    #
    #       # With php7.0-cgi alone:
    #       fastcgi_pass 127.0.0.1:9000;
    #       # With php7.0-fpm:
    #       fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /.ht {
    #       deny all;
    #}

    #enabled Cross Origin Resource Sharing
    add_header Access-Control-Allow-Origin *;
}
 

файл war правильно развернут в /opt/wildfly/автономный/развертывания/
но они недоступны

когда я перейду к :8080/имя сервлета

firefox сообщает, что не удается подключиться Firefox не может установить соединение с сервером по адресу :8080.

еще одна проблема, я не купил ssl-сертификат, я просто хочу, чтобы сайт http был запущен и работал, прежде чем думать о его защите, но firefox продолжает перенаправлять на сайт https, которого не существует, есть идеи, как это остановить ?