Wiki Tomcat8 + Nginx

Hello, i followed this tutorial to install XWiki https://pikedom.com/xwiki-on-ubuntu-16-04-lts-with-nginx-reverse-proxy/
But i cant got the ssl with nginx + tomcat. I also followed this guide "Https (secure)
https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationTomcat/
But i got this error in tomcat. [http-nio-8080-exec-2] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

I recently just this very thing on Ubuntu 18.04. These are the packages I installed: apt-get install -y openjdk-8-jre xwiki-tomcat8-common nginx Nothing fancy about the install. Here are a copy of my files I had to setup that should give you some direction:

/ETC/XWIKI/HIBERNATE.CFG.XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD//EN"
  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <session-factory>
    <property name="show_sql">false</property>
    <property name="use_outer_join">true</property>
    <property name="jdbc.use_scrollable_resultset">false</property>
    <property name="dbcp.defaultAutoCommit">false</property>
    <property name="dbcp.maxTotal">50</property>
    <property name="dbcp.maxIdle">5</property>
    <property name="dbcp.maxWaitMillis">30000</property>
    <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
    <property name="connection.url">jdbc:mysql://xwiki.rds.amazonaws.com/xwiki?useSSL=false</property>
    <property name="connection.username">master</property>
    <property name="connection.password">DBPASSWORD</property>
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
    <property name="connection.useUnicode">true</property>
    <property name="connection.characterEncoding">UTF-8</property>
    <property name="dbcp.poolPreparedStatements">true</property>
    <property name="dbcp.maxOpenPreparedStatements">20</property>
    <property name="hibernate.connection.charSet">UTF-8</property>
    <property name="hibernate.connection.useUnicode">true</property>
    <property name="hibernate.connection.characterEncoding">utf8</property>
    <mapping resource="xwiki.hbm.xml"/>
    <mapping resource="feeds.hbm.xml"/>
    <mapping resource="instance.hbm.xml"/>
    <mapping resource="notification-filter-preferences.hbm.xml"/>
    <mapping resource="mailsender.hbm.xml"/>
  </session-factory>
</hibernate-configuration>

/ETC/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;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

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

upstream xwiki {
   server localhost:8080;
}
server {
    listen       80;
    server_name  xwiki.MYDOMAIN.net;

    # Normally root should not be accessed, however, root should not serve files that might compromise the security of your server.
    root /var/www/html;

    location / {
        # All "root" requests will have /xwiki appended AND redirected to mydomain.com
        rewrite ^ $scheme://$server_name/xwiki$request_uri? permanent;
    }

    location ^~ /xwiki {
       # If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat
       # Read more about proxy_pass: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
       proxy_pass http://xwiki;
       proxy_set_header        X-Real-IP $remote_addr;
       proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header        Host $http_host;
       proxy_set_header        X-Forwarded-Proto $scheme;
    }
}
}

thank you!!